Net [ Accounts | Computer |
Config | File |
Group | HELP |
HelpMSG | LocalGroup |
Name| Print |
Send | Session |
Share |
Start service* | Stop | Pause |Continue
| Statistics
| Time | Use
| User | View ]
see also netSh (net Shell)
Net accounts [/FORCELOGOFF:{minutes
|No}]
[/MinPWLen:length]
Updates the user accounts database and
modifies password and logon requirements for all accounts.
without options, NET ACCOUNTS 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
Two conditions are required in order for options used with NET ACCOUNTS to take effect:
NET USER
/ForceLogoff:{minutes | NO} minutes a
user has before being forced off when the account expires or valid
logon hours expire. NO, the default, prevents forced logoff
/MinPWLen:length minimum characters for a
password. 0-14 ; the default is 6
/MaxPWAge:{days | Unlimited} maximum number of days
that a password is valid. UNLIMITED.
/MaxPWAge can't be less than /MinPWAge. /MinPWAge:days minimum number of days that must
pass before a user can change a password. 0 sets no minimum
time. 0-999; default 0 /MinPWAge can't be more
than /MaxPWAge.
/UniquePW:number Requires that a user's 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:time Sets the maximum number of minutes a
user's session can be inactive before it is disconnected. -1 never disconnect. -1, 1-65535 ; default
15.
/SRVCOMMENT: " text" Adds
a comment for the server that is displayed in Windows Screens(?) and with
NET VIEW . max 48 characters, enclose in quotes.
/Hidden:{YES | NO} Specifies whether the server's computername appears
on display listings of servers.
Hiding a server does not alter the permissions on that
server. The default is NO.
NET CONFIG WORKSTATION [/CHARCOUNT:bytes]
[/CHARTIME:msec] [/CHARWAIT:sec]
/CHARCOUNT:bytes Specifies the amount of data Windows
collects before sending the data to a communication device. If
/CHARTIME:msec is also set, Windows acts on whichever option is satisfied
first. 0-65535 ; default 16.
/CHARTIME:msec Sets the number of milliseconds Windows
collects data before sending it. If
/CHARCOUNT:bytes is also set, Windows acts on whichever option is
satisfied first. 0-65535000; default 250 milliseconds.
/CHARWAIT:sec Windows waits for a
communication device to become available. 0-65535 ;
default 3600 i.e. 60 minutes*.
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.
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.
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.
/COMMENT:"text"
/DOMAIN Performs the operation on the domain controller of the
current domain. Otherwise, the operation is performed on the local
workstation.
SALES\RALPHR).
/ADD Adds a groupname or username to a local group. An
account must be established for users or global groups added to a local
group with this command.
/DELETE Removes a groupname or username from a local 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.
top
NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]NET USE {devicename | *} [password | *] /HOME
NET USE [/PERSISTENT:{YES | NO}]
NET USE displays or connects a computer to a shared resource or disconnects a computer from a shared resource.
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
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.
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 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 ttop
NET HELPMSG message#
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.
set Default Notepad header and footer