Net.exe reference.
March 4, 1999
A. Below is a summary of all the net.exe usage methods.
net accounts
Used to modify user accounts. Specified on its own will give informationabout the current logon.
Options:
/forcelogoff: | Minutes until the user gets logged off after logon hours expire. No means aforced logoff will not occur |
/lockoutthreshold: | This parameter allows you to configure the number of failed logon attemptsbefore the account is locked. The range is 1 to 999. |
/lockoutduration: | This parameter specifies the number of minutes accounts remain lockedbefore automatically becoming unlocked. The range is 1 to 99999. |
/lockoutwindow: | This parameter lets you configure the maximum number of minutesbetween two consecutive failed logon attempts before an account is locked. Therange is 1 to 99999. |
/minpwlen: | Minimum number of characters for the password. Default is 6, valid range isbetween 0 and 14 |
/maxpwage: | Maximum number of days a password is valid. Default is 90, valid range isbetween 0 and 49710 |
/minpwage: | Number of days that must occur before the password can be changed. Defaultis 0, valid range is between 0 and maxpwage |
/uniquepw: | Password may not be reused for number attempts |
/sync | Forces a domain sync |
/domain | Performs any of the above actions on the domain controller |
net computer
Used to add and remove computer accounts from the domain.
Options:
\ | Name of the computer to be added or removed |
/add | Add the specified computer |
/del | Removes the specified computer |
net config server
Allows modifications to the server service. Entered with no parameters givedetails of the current configuration
Options:
/autodisconnect: | Number of minutes an account may be inactive before disconnection. Defaultis 15, valid range between 1 and 65535. -1 means never disconnected. |
/srvcomment:"text" | Set the comment for the machine |
/hidden: | Specified is the computer is hidden in the listing of computers |
net config workstation
Allows modifications to the workstation service. Entered with no parametersgive details of the current configuration
Options:
/charcount: | Number of bytes to be collected before data is sent. The default is 16,valid range is between 0 and 65535. |
/chartime: | Number of milliseconds NT waits before sending data. If charcount is alsoset whichever is satisfied first is used. Default is 250, valid range isbetween 0 and 65535000. |
/charwait: | Number of seconds NT waits for a communications device to become available.Default is 3600, valid is between 0 and 65535. |
net continue
Restarts the specified paused service.
net file
Lists any files that are open/locked via a network share.
Options:
id | Identification of the file (given by entering net file on its own) |
/close | Close the specified lock |
See Q. How can I tell who has which files open on a machine? for more details.
net group
Adds/modifies global groups on servers. Without parameters will list globalgroups.
Syntax:
net group [/command:""][/domain]
net group [/add [/comment:""] or/delete] [/domain]
net group /add or /delete [/domain]
Options:
groupname | Name of the global group |
/comment:"" | Comment if a new global group is created. Up to 48 characters |
/domain | Performs the function on the primary domain controller |
username | Username to which apply the operation |
/add | Adds the specified user to the group or the group to the domain |
/delete | Removes a group from a domain or a user from a group |
net localgroup
Performs actions on local groups. Same parameters as net group.
net name
Adds/removes a name to which messaging may be directed to. Running thecommand on its own will list all messaging names eligible on the machine.
Options:
name | The messaging name to be added/removed |
/add | Add the name |
/delete | Remove the name |
net pause
Used to pause a service from the command line.
net print
Used to list/modify print jobs.
Options:
\computername | Indicates the computer that hosts the printer queue |
sharename | Name of the printer queue |
job | The job number to modify |
/hold | Pauses a job on the print queue |
/release | Removes the hold status of a job on the print queue |
/delete | Deletes a job off of the print queue |
net send
Sends a message to a computer, user or messaging name.
Options:
name | Name of the user, computer or messaging name. Can also use * to send toeveryone in the group |
/domain: | All users in the current domain or the specified domain |
/users | To all users connected to the server |
message | The message to send |
net session
Lists or disconnects sessions. Used with no options lists the currentsessions.
Options:
\ | The computer of whose session to close |
/delete | Closes the session to the computer specified. Omitting a computer name willclose all sessions |
net share
Used to manage shares from the command line.
Syntax:
net share =:[/users= or /unlimited] [/remark:"text"]
net share [/users= or /unlimited][/remark:"text"]
net share /delete
Options:
Name of the share | |
Used to specify the printer name if specifying a printer share | |
: | Absolute path |
/users: | Number of simultaneous connections to the share |
/unlimited | Unlimited usage |
/remark:"" | Comment for the share |
/delete | Delete the specifed share |
net start
Start the specified service
net statistics [workstation or service]
Gives information about either the server or workstation service.
net stop
Stops the specified service
net time
Used to synchronize the time of a computer.
Options:
\ | The name of the computer to which synchronize the time |
/domain: | Synchronize the time with the specified domain |
/set | Sets the time |
net use
Connects or disconnects to a network share. Used with no qualifiers liststhe current network mappings.
Syntax:
net use or * \[password or *] [/user:[domainuser] /delete or [persistent:[yes or no]]
net use /home /delete or /persistent:[yes or no]
Options:
Name of the device to map to. Use * to use the next available device name | |
\computer name | The name of the computer controlling the resource |
sharename | Name of the share |
volume | Name of the volume if on a NetWare server |
password | Password to which to map |
* | Gives a prompt to which to enter the password |
/user: | Specifies the user to connect as |
/home | Connects to a users home directory |
/delete | Closes a connection |
/persistent:[yes or no> | Sets if the connection should be reconnected at next logon |
net user
Used to add/create/modify user accounts
Syntax:
net user [password or *] [/add] [options] [/domain]
net user usernameThe name of the accountpasswordAssigns or changes a password*Gives a prompt for the password/domainperform on a domain/addCreates the account/deleteRemoves the account/active:[yes or no]Activates or deactivates the account/comment:""Adds a descriptive comment/counterycode.nnnnnn is the number operating system code. Use 0 for the operating systemsdefault/expires:The expiry date of the account. Date format is mm,dd,yy or dd,mm,yy whichis determined by the country code/fullname:""The full name of the account/homedir:Path for the users home directory/passwordchg:[yes or no]Used to specify if the user can modify the password/passwordreq:[yes or no]Used to determine if the account needs a password/profilepath:Used to specify the profile path/scriptpath:Path of the logon script/times:Hours user may logon/usercomment:""A comment for the account/workstations:Names the user may logon to. * means all.net viewLists shared resources on a domain. Used with no parameters lists allmachine accounts in a domain.Options: \computer nameSpecifies the computer whose resource should be viewed/domain:The domain to be used/network:A NetWare network to be used
About the Author
You May Also Like