MS Windows Net command

Accounts Computer Config File Group HELP HelpMSG LocalGroup Name Print Send Session Share Statistics Time Use User View

service Start, Stop Pause Continue

see also netSh (net Shell)


NET USE displays or connects or disconnects a shared resource

NET USE [devicename | *] [\\computername\sharename[\volume] [password | *]]
    [/SmartCard]
    [/SaveCred]
    [[/Delete]|[/Persistent:{YES|NO}]]
    [/User:[domainname\]username]
    [/User:[dottedDomainname\]username]
    [/USER:[username@dottedDomainname]

NET USE {devicename | *}   [password | *]   /HOME

NET USE [/Persistent:{YES | NO}]

Errors:

System error 1219 - Multiple connections to a server
Use net use * /delete to delete all mapping and retry.

Example

C:\>net use

New connections will not be remembered.

Status       Local Remote                     Network
-----------------------------------------------------------------------
Disconnected E:    \\SNAKE\RW_CD              Microsoft Windows Network
OK                 \\SMOTHER\SMOTHER-S_C      Microsoft Windows Network
OK                 \\SMOTHER\SMOTHER-S_D      Microsoft Windows Network
OK                 \\SMOTHER\SMOTHER-S_F      Microsoft Windows Network
Disconnected       \\SNAKE\RW_CD              Microsoft Windows Network
Disconnected       \\Snake\snake-s_C          Microsoft Windows Network
Disconnected       \\SNEAKER\C                Microsoft Windows Network
Disconnected       \\Sneaker\C\0DGG\hicom\rds Microsoft Windows Network
Disconnected       \\Sneaker\C\0DGG\Kodak     Microsoft Windows Network

C:\>net use E:

Local name        E:
Remote name       \\SNAKE\RW_CD
Resource type     Disk
Status            Disconnected
# Opens           0
# Connections     100

C:\>net use f:  \\kitchen\data0  secret /user:administrator
System error 1219 has occurred.  
The credentials supplied conflict with an existing set of credentials.

C:\>net use
New connections will not be remembered.

Status       Local     Remote                    Network 
-------------------------------------------------------------------------------
OK                     \\KITCHEN\DATA            Microsoft Windows Network
The command completed successfully.

C:\>net use \\kitchen\data /delete
\\kitchen\data was deleted successfully.  

C:\>net use f:  \\kitchen\data0  secret /user:administrator
The command completed successfully.


top


NET FILE [id [/CLOSE]]

Without options, lists the open files on a server.
Includes the identification number assigned to an open file, the pathname of the file, the username, and the number of locks on the file.

Server only

>net file
ID  Path                                    User name  # Locks
-------------------------------------------------------
1   D:\Documents\...\outlook\outlook.pst    MGERMAN    0

/CLOSE a shared file and removes file locks.

top



Net ACCOUNTS [/ForceLogoff:{minutes |No}] [/MinPWLen:length] [/MaxPWAge:{days | Unlimited}] [/MinPWAge:days] [/UniquePW:number] [/Domain]

Updates the user accounts database and modifies password and logon requirements for all accounts.
Without options, displays the current settings for password, logon limitations, and domain information.

Force user logoff how long after time expires?: Never
  Minimum password age (days):                        0
  Maximum password age (days):                       42 
  Minimum password length:                            6 
  Length of password history maintained:          None 
  Lockout threshold:                              Never 
  Lockout duration (minutes):                        30
  Lockout observation window (minutes):              30 
  Computer role:  SERVER 

In order for options to take effect both:

  1. The password and logon requirements are only effective if user accounts have been set up (use User Manager or the NET USER
  2. The Net Logon service must be running on all servers in the domain that verify logon. Net Logon is started automatically when Windows starts.

top

NET Computer \\computername {/Add | /Del} to/from the domain. only on servers.
top


NET Config Server| Workstation

C:\>net config server
Server Name           \\SLAMMER
Server Comment

Software version      Windows 2000
Server is active on

   NetBT_Tcpip_{BA14A499-4558-4DCA-ADC7-56719B02A65D} (0050fc9cf227)  * 
   NetBT_Tcpip_{BA14A499-4558-4DCA-ADC7-56719B02A65D} (0050fc9cf227)
   NetbiosSmb (000000000000)
   NetbiosSmb (000000000000)

Server hidden                    No
Maximum Logged On Users          Unlimited
Maximum open files per session   16384

Idle session time (min)          15

C:\>net config workstation
Computer name        \\SLAMMER
Full Computer name   slammer
User name            Administrator

Workstation active on
   NetbiosSmb (000000000000)
   NetBT_Tcpip_{BA14A499-4558-4DCA-ADC7-56719B02A65D} (0050FC9CF227)

Software version                Windows 2000

Workstation domain              RWS
Workstation Domain DNS Name     (null)
Logon domain                    RWS

COM Open Timeout (sec)          0
COM Send Count (byte)          16
COM Send Timeout (msec)        250
To get help with configuring a service, type NET HELP CONFIG service .

NET CONFIG SERVER [/AutoDisconnect:time] [/SrvComment:"text"] [/Hidden:{YES|NO}]
displays or changes settings for the Server service.

top

NET CONFIG WorkStation [/CharCount:bytes] [/CharTime:msec] [/CharWait:sec]

top


NET GROUP [groupname [/Comment:"text"]] [/domain]
           groupname {/Add [/Comment:"text"] | /Delete} [/Domain]
           groupname username [...] {/Add | /Delete} [/Domain]

adds, displays, or modifies global groups on servers. (only permitted on Domain collers)

Supply only a groupname to view a list of users in a group.

top


NET LOCALGROUP [groupname [/COMMENT:"text"]] [/Domain]
                groupname {/Add [/Comment:"text"] | /Delete} [/Domain]
                groupname name [...] {/ADD | /Delete} [/Domain]

C:\>net localgroup

Aliases for \\SLAMMER
---------------------------------------------------------------------------
*Administrators           *Backup Operators         *DHCP Administrators
*DHCP Users               *Guests                   *NetShow Administrators
*Power Users              *Replicator               *SLAMMER Admins
*SLAMMER Authors          *SLAMMER Browsers         *Users
*WINS Users
C:\>net localgroup users

Alias name  users
Comment     Users are prevented from making system-wide changes.
	    Can run certified applications, but not most legacy applications

Members
-------------------
mgerman
NT AUTHORITY\Authenticated Users
NT AUTHORITY\INTERACTIVE
REALWRLD\Domain Users


C:\>net localgroup Administrators

Alias name     Administrators
Comment        Administrators have complete and
                        unrestricted access to the computer/domain

Members
----------------------
Administrator
mgerman
NetShowServices
REALWRLD\Domain Admins

top


NET START [service] 

Net Start lists running services.

service names are NOT case sensitive and
include, but are not limited to the following:

Multi word services are in quotes(really) so you can copy and paste.
Just click 3 times
right click, copy.
Then start a CMD prompt and right click to paste.
start Alerter
start "Automatic Updates"
start "COM+ Event System"
start "Client Service For Netware"
start "Computer Browser"
start CSRSS
start DCFSsvc
start "DHCP Client"
start "DHCP Server"
start "Directory Replicator"
start "Distributed File System"
start "Distributed Link Tracking Client"
start "Distributed Transaction Coordinator"
start "Event Log"
start "IIS Admin Service"
start "Internet Authentication Service"
start "Internet Connection Sharing"
start "IPSEC Policy Agent"
start "LexBce Server"
start "License Logging Service"
start "Logical Disk Manager"
start LPDSVC
start Messenger
start "Net Logon"
start "Network Connections"
start "Network DDE"
start "Network DDE DSDM"
start "Network Monitoring Agent"
start "NT LM Security Support Provider"
start "Plug and Play"
start "Print Spooler"
start "Protected Storage"
start "Remote Access Connection Manager"
start "Remote Access ISNSAP Service"
start "Remote Access Server"
start "Remote Procedure call (RPC) Locator"
start "Remote Procedure Call (RPC)"
start "Remote Registry Service"
start "Remote Storage File"
start "Remote Storage Media"
start "Removable Storage"
start "RunAs Service"
start "Security Accounts Manager"
start Server
start "Simple TCP/IP Services"
start "SNMP Service"
start "Still Image Service"
start "System Event Notification"
start Spooler
start "Task Scheduler"
start "TCP/IP NetBIOS Helper Service"
start "TCP/IP Print Server"
start Telephony
start "Terminal Services"
start "Terminal Services Licensing"
start UPS
start "Windows Internet Name Service (WINS)"
start "Windows Media Monitor Service"
start "Windows Time"
start Workstation
start "Windows Management Instrumentation Driver Extensions"

These services are available only on Windows Server:

start "Microsoft DHCP Server"
start "File Server For Macintosh"
start "Gateway Service For Netware"
start "Print Server For Macintosh"
start "Windows Internet Name Service" xxx

service names of "two words" or more must be enclosed in quotation marks.

ss64.com explainations.

NET START can start services not provided by Microsoft.

top

NET STOP service

Stopping a service cancels any network connections the service is using.
Since some services are dependent on others, Stopping one service can stop others.
The Eventlog service cannot be stopped.

NET PAUSE service

suspends a Windows service or resource. Pausing a service puts it on hold.

top




NET TIME [\\computername | /Domain[:domainname] | /RTSDomain[:domainname]] [/SET ] [\\computername] /QuerySNTP [\\computername] /SetSNTP[:NTP server list]

synchronizes the computer's clock with that of another computer or domain, or displays the time for a computer or domain.
without options on a Windows Server domain, it displays the current date and time at the computer designated as the time server for the domain. sets the NTP timeserver for computername.

top


NET PRINT \\computername\sharename [\\computername] job# [/HOLD | /RELEASE | /DELETE]

PRINT displays print jobs and shared queues. For each queue, the display lists jobs, showing the size and status of each job, and the status of the queue.


Appears MS removed send from Windows 7

NET SEND {name | * | /Domain[:name] | /Users} message

Sends messages to other users, computers, or messaging names on the network. The Messenger service must be running to receive* messages. You can send a message only to a name that is active on the network. If the message is sent to a username, that user must be logged on and running the Messenger service to receive the message.

name Is the username, computername, or messaging name to send the message to. If the name is a computername that contains blank characters, enclose the alias in quotation marks (" ").

* Sends the message to all the names in your group.

/DOMAIN[:name] Sends the message to all the names in the workstation domain. If name is specified, the message is sent to all the names in the specified domain or workgroup.

/USERS Sends the message to all users connected to the server.

message Message cannot contain "shell" special characters ( & > < )

top


NET SESSION [\\computername] [/DELETE]

NET SESSION lists or disconnects sessions between the computer and other computers on the network.
When used without options, it displays information about all sessions with the computer of current focus. This command works only on servers.

Computer               User name            Client Type       Opens Idle time

-------------------------------------------------------------------------------
\\192.168.1.6          ROOT                 Linux version 2.6     1 00:00:00

top


NET SHARE makes a server's resources available to network users.

NET SHARE sharename
NET SHARE sharename=drive:path
[/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Automatic | No ]
devicename |drive:path}
/DELETE

  C:\>net share

  Share name   Resource                        Remark
  ------------------------------------------------------------------
  apps         C:\                            explicitly shared
  sys          C:\
  archive      W:\
  clipart      V:\
  LexmarkZ32   LPT1:                  Spooled  Lexmark Z32

                special shares
  print$       C:\WINNT\System32\spool\drivers Printer Drivers

  V$           V:\
  C$           C:\                             Default share
  S$           S:\                             Default share
  W$           W:\                             Default share

  ADMIN$       C:\WINNT                        Remote Admin
  REPL$        C:\WINNT\System32\Repl\Export     replication export
  NETLOGON     C:\WINNT\System32\repl\import\s Logon server share
  IPC$                                         Remote IPC (named pipes)

top


NET STATISTICS displays the statistics log for the local Workstation or Server service. Used without parameters, NET STATISTICS displays the services for which statistics are available.

   	C:\>net statistics
	      Statistics are available for the following running services:

	      Server
	      Workstation  
C:\>net statistics server
Server Statistics for \\SLAMMER

Statistics since 5/2/2002 11:54 PM

Sessions accepted              2
Sessions timed-out             0
Sessions errored-out           0

Kilobytes sent                 807
Kilobytes received             1198

Mean response time (msec)      0

System errors                  0
Permission violations          0
Password violations            0

Files accessed                 72
Communication devices accessed 0
Print jobs spooled             0*

Times buffers exhausted

 Big buffers                   0
 Request buffers               0

C:\>net statistics workstation
Workstation Statistics for \\SLAMMER

Statistics since 5/2/2002 11:53 PM

Bytes received                            288828
Server Message Blocks (SMBs) received     2473
Bytes transmitted                         241737
Server Message Blocks (SMBs) transmitted  2474
Read operations                           34
Write operations                          0
Raw reads denied                          0
Raw writes denied                         0
Network errors                            0
Connections made                          49
Reconnections made                        4
Server disconnects                        1
Sessions started                          251
Hung sessions                             0
Failed sessions                           0
Failed operations                         1
Use count                                 330
Failed use count                          197

top


NET User [username [password | *] [options]] [/DOMAIN]

NET User creates and modifies user accounts on computers.

>net user
User accounts for \\SLAMMER
----------------------------------------------------------------
admin                    Administrator            ASPNET
Guest                    IUSR_SLAMMER             IWAM_SLAMMER
NetShowServices          TsInternetUser 
Only on servers.

net user mgerman
User name                    mgerman
Full Name
Comment
User's comment
Country code                 000 (System Default)
Account active               Yes
Account expires              Never 
Password last set            1/25/2016 5:34:03 PM
Password expires             Never
Password changeable          1/25/2016 5:34:03 PM
Password required            No
User may change password     Yes 
Workstations allowed         All
Logon script
User profile
Home directory
Last logon                   1/1/2016 9:18:03 PM 
Logon hours allowed          All 
Local Group Memberships      *Administrators       *HomeUsers
Global Group memberships     *None 

net user mgerman option  CHANGES password to option!

net user mgerman /homedir:D:\documenta\mgerman

net user mgerman /homedir:\\slayer\data\documenta\mgerman

top


NET VIEW [\\computername [/Cache] | /Domain[:domainname]]

*

NET VIEW /Network:NW [\\computername] NET VIEW displays a list of resources being shared on a computer.


net view \\slammer
Shared resources at \\slammer

Slammer shares printer, C, D, and IP to internet

Share name   Type         Used as  Comment

-------------------------------------------------------------------------------
E            Disk                  CD drive (fast but sometimes misses stuff !
Epson        Print                 single sheets! , disconnected.
EverQuest    Disk
GenericT     Print                 Don't expect this to print !
LexmarkZ     Print                 Check for paper
MSG001       Disk                  backup CD from 12/29/99 ...
MSG002       Disk                  backup CD from 12/29/99 ...
slammer-s_C  Disk
slammer-s_D  Disk
slammer-s_I  Disk                  Backups
slammer-s_J  Disk                  Old Photos, Backups

net view \\snake
Shared resources at \\snake

I am the BackupDomain Controller

Share name   Type         Used as  Comment

-------------------------------------------------------------------------------
A            Disk                  Dis be da floppy drive
NETLOGON     Disk                  Logon server share
RW_CD        Disk         (UNC)
snake-s_C    Disk         (UNC)    I power down my disk when I'm not busy, it t
snake-s_d    Disk                  I power down my disk when I'm not busy, it t
top

  C:\>net share

  Share name   Resource                        Remark
  ------------------------------------------------------------------
  apps         C:\                            explicitly shared
  sys          C:\
  archive      W:\
  clipart      V:\
  LexmarkZ32   LPT1:                  Spooled  Lexmark Z32

                special shares
  print$       C:\WINNT\System32\spool\drivers Printer Drivers

  V$           V:\
  C$           C:\                             Default share
  S$           S:\                             Default share
  W$           W:\                             Default share

  ADMIN$       C:\WINNT                        Remote Admin
  REPL$        C:\WINNT\System32\Repl\Export     replication export
  NETLOGON     C:\WINNT\System32\repl\import\s Logon server share
  IPC$                                         Remote IPC (named pipes)

NET HELPMSG message#
NET HELPMSG nnnn
Don't type NET as part of the message number.

top

set Default Notepad header and footer