Accounts Computer
Config File
Group HELP
HelpMSG LocalGroup
Name Print
Send† Session
Share
Statistics
Time Use
User View
Start service* Stop Pause Continue
see also netSh (net Shell)
NET USE displays or connects or disconnects a shared resource
NET USE
[/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}]
devicename
D: through LPT1: through LPT3:).
\\computername computer controlling the shared resource. If the computername contains blanks, enclose the double backslashes (\\) and the computername in quotation marks (" ").
\volume a NetWare volume.password or * to prompt for the password.
/User Specifies a different username with which the connection is made.
/SmartCard credentials are on a smart card.
/SaveCred save username/password
/Home Connects a user to their home directory.
/Delete Cancels a network connection and removes the connection from the list of persistent connections.
/Persistent
YES Saves connections as they are made, and restores them at next logon.NO Does not save the connection being made OR subsequent connections;
existing connections will be restored at next logon. /DELETE removes persistent connections.
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.
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.
Updates the user accounts database and
modifies password and logon requirements for all accounts. In order for options to take effect both:
Net ACCOUNTS [/ForceLogoff:{minutes
|No}]
[/MinPWLen:length]
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
NET USER
top
/ForceLogoff:{minutes | NO} minutes a user has before being forced off when the account expires or valid
logon hours expire. NO, default, prevents forced logoff
/MinPWLen:length minimum characters for password. 0-14 ; default:6
/MaxPWAge:{days | Unlimited} maximum days password is valid.
For no limit use UNLIMITED.
/MinPWAge:days minimum days before a user can change a password. 0:no minimum
. 0-999; default 0
/MinPWAge can't be more than /MaxPWAge.
/UniquePW:number Requires passwords be unique
through the specified number of password changes. maximum 24.
/Domain Performs the operation on a domain controller of the
current domain.
Otherwise, the operation is performed on the local computer.
The request will be processed at a domain controller for domain domain .
Force user logoff how long after time expires?: Never
Minimum password age (days): 0
Maximum password age (days): 42
Minimum password length: 0
Length of password history maintained: None
Lockout threshold: Never
Lockout duration (minutes): 30
Lockout observation window (minutes): 30
Computer role: Primary or Server
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
NET HELP CONFIG service .
NET CONFIG SERVER [/AutoDisconnect:time]
[/SrvComment:"text"] /Hidden:{YES|NO}]/AutoDisconnect:minutes a user's session can be inactive before it is disconnected. -1 never . max:65535 ; default:15.
/SrvComment:"text" displayed in Windows Screens(?) and with
NET VIEW . max 48 characters.
/Hidden:{YES|NO}
whether the server's computername appears on display listings of servers.
Hiding a server does not alter the permissions on that server. default: NO.
NET CONFIG WorkStation [/CharCount:bytes]
[/CharTime:msec] [/CharWait:sec]
/CharCount:bytes amount of data collected before sending it to a communication device. If
/CharTime:msec is also set, Windows acts on whichever option is satisfied
first. 0-65535 ; default 16.
/CharTime:msec Windows waits collecting data before sending it. If
/CharCount:bytes is also set, Windows acts on whichever option is
satisfied first. 0-65535000; default:250
/CharWait:sec Windows waits for a
communication device to become available. 0-65535 ;
default:3600 i.e. 60 minutes*.
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.
/Comment:"text" 48 characters max.
/Domain Performs the operation on a domain controller of the
current domain. net group /domain The request will be processed at a domain controller for domain REALWRLD. Group Accounts for \\SMOTHER ------------------------------- *Domain Admins *Domain Guests *Domain Users net group "Domain Admins" /domain The request will be processed at a domain controller for domain REALWRLD. Group name Domain Admins Comment Designated administrators of the domain Members ------------------------------------------------------- Administrator DGerman mgerm
/ADD a group, or username to a group.
/DELETE a group, or username from a group.
NET START [service]
Net Start lists running services.
|
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 "Windows Management Instrumentation Driver Extensions"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
These services are available only on Windows Server:
|
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.
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.
\\computername the computer to check or synchronize with.
/Domain[:domainname] synchronize the time from the Primary Domain Controller of domainname.
/RTSDomain[:domainname] synchronize with a Reliable Time Server from domainname.
/SET Synchronizes the computer's time with the computer or domain.
/QUERYSNTP Displays the configured NTP server for this computer
/SETSNTP[:ntp server list] Sets the NTP time servers to be
used by this computer. This may be a list of IP addresses or DNS names
separated by spaces. If multiple timeservers are listed, the list must be surrounded by quotes.
NET
PRINT \\computername\sharename
[\\computername] job# [/HOLD | /RELEASE | /DELETE]
PRINT
HOLD Prevents a job in a queue from printing. The job
stays in the printer queue, and other jobs bypass it until it is
released. /RELEASE Reactivates a job that is held.
DELETE Removes a job from a queue.
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 ( & > < )
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.
DELETE Ends the session between the local computer and
computername, and closes all open files on the computer for the session.
If computername is omitted, all sessions are ended.
Computer User name Client Type Opens Idle time ------------------------------------------------------------------------------- \\192.168.1.6 ROOT Linux version 2.6 1 00:00:00
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)
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 |
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 TsInternetUserOnly on servers.
username 20 characters max
password Assigns or changes a password for the user's
account. A password must satisfy the minimum length set with the
/MINPWLEN It can have as many as 14 characters. * Produces a prompt for the password./random to have windows generate a strong password and set it.
/DOMAIN Performs the operation on a domain controller
/ADD
/DELETE
/ACTIVE:{YES | NO}
/COMMENT:"text"
/EXPIRES:{date | NEVER} in the form mm/dd/yy
/FULLNAME:"name"
/HOMEDIR:pathname The path must exist.
/PASSWORDCHG:{YES | NO}
/PASSWORDREQ:{YES | NO}
/PROFILEPATH[:path]
/SCRIPTPATH:pathname
TIMES:{times | ALL} TIMES is expressed as day[-day][,day[-day]],time[-time][,time
[-time]], limited to 1-hour increments. Days can be spelled out or
abbreviated. ALL means a user can always log
on, and a blank value means a user can never log on. Separate day and
time entries with a comma, and separate multiple day and time entries with a semicolon.
/UserComment:"text"
/WorkStations:{computername[,...] |
*} many as eight computers from which a user can log
on to the network. If /WorkStations has no list or if the list is *,
the user can log on from any computer.
net user mgerman /homedir:D:\documenta\mgerman net user mgerman /homedir:\\slayer\data\documenta\mgerman
NET VIEW [\\computername [/Cache] | /Domain[:domainname]]
*
NET HELPMSG message#
set Default Notepad header and footer
NET VIEW /Network:NW
[\\computername]
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 nnnn
Don't type NET as part of the message number.