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 information about the current logon.

Options:

/forcelogoff:<minutes or no> Minutes until the user gets logged off after logon hours expire. No means a forced logoff will not occur
/lockoutthreshold:<number of failed attempts> This parameter allows you to configure the number of failed logon attempts before the account is locked. The range is 1 to 999.
/lockoutduration:<minutes>  This parameter specifies the number of minutes accounts remain locked before automatically becoming unlocked. The range is 1 to 99999.
/lockoutwindow:<minutes>   This parameter lets you configure the maximum number of minutes between two consecutive failed logon attempts before an account is locked. The range is 1 to 99999.
/minpwlen:<length> Minimum number of characters for the password. Default is 6, valid range is between 0 and 14
/maxpwage:<days> Maximum number of days a password is valid. Default is 90, valid range is between 0 and 49710
/minpwage:<days> Number of days that must occur before the password can be changed. Default is 0, valid range is between 0 and maxpwage
/uniquepw:<number> 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:

\\<computer name> 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 give details of the current configuration

Options:

/autodisconnect:<minutes> Number of minutes an account may be inactive before disconnection. Default is 15, valid range between 1 and 65535. -1 means never disconnected.
/srvcomment:"text" Set the comment for the machine
/hidden:<yes or no> Specified is the computer is hidden in the listing of computers

net config workstation

Allows modifications to the workstation service. Entered with no parameters give details of the current configuration

Options:

/charcount:<bytes> Number of bytes to be collected before data is sent. The default is 16, valid range is between 0 and 65535.
/chartime:<msec> Number of milliseconds NT waits before sending data. If charcount is also set whichever is satisfied first is used. Default is 250, valid range is between 0 and 65535000.
/charwait:<seconds> Number of seconds NT waits for a communications device to become available. Default is 3600, valid is between 0 and 65535.

net continue <service name>

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 global groups.

Syntax:

net group <group name> \[/command:"<text>"\] \[/domain\]
net group <group name> \[/add \[/comment:"<text>"\] or /delete\] \[/domain\]
net group <group name> <user name> /add or /delete \[/domain\]

Options:

groupname Name of the global group
/comment:"<text>" 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 the command 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 <service name>

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 to everyone in the group
/domain:<domain name> 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 current sessions.

Options:

\\<computer name> The computer of whose session to close
/delete Closes the session to the computer specified. Omitting a computer name will close all sessions

net share

Used to manage shares from the command line.

Syntax:

net share <sharename>=<drive>:\<directory> \[/users=<number> or /unlimited\] \[/remark:"text"\]
net share <sharename> \[/users=<number> or /unlimited\] \[/remark:"text"\]
net share <sharename or device name or drive and path> /delete

Options:

<sharename> Name of the share
<device name> Used to specify the printer name if specifying a printer share
<drive>:<path> Absolute path
/users:<number> Number of simultaneous connections to the share
/unlimited Unlimited usage
/remark:"<text>" Comment for the share
/delete Delete the specifed share

net start <service name>

Start the specified service

net statistics \[workstation or service\]

Gives information about either the server or workstation service.

net stop <service name>

Stops the specified service

net time

Used to synchronize the time of a computer.

Options:

\\<computer name> The name of the computer to which synchronize the time
/domain:<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 lists the current network mappings.

Syntax:

net use <device name> or * \\<computer name>\<share name> \[password or *\] \[/user:\[domain\user\] /delete or \[persistent:\[yes or no\]\]
net use <device name> /home /delete or /persistent:\[yes or no\]

Options:

<device name> 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:<domain>\<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 <username> \[password or *\] \[/add\] \[options\] \[/domain\]
net user <username\] /delete /domain

username The name of the account
password Assigns or changes a password
* Gives a prompt for the password
/domain perform on a domain
/add Creates the account
/delete Removes the account
/active:\[yes or no\] Activates or deactivates the account
/comment:"<text>" Adds a descriptive comment
/counterycode.nnn nnn is the number operating system code. Use 0 for the operating systems default
/expires:<date or never> The expiry date of the account. Date format is mm,dd,yy or dd,mm,yy which is determined by the country code
/fullname:"<name>" The full name of the account
/homedir:<path> 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:<path> Used to specify the profile path
/scriptpath:<path> Path of the logon script
/times:<times or all> Hours user may logon
/usercomment:"<text>" A comment for the account
/workstations:<machine names> Names the user may logon to. * means all.

net view

Lists shared resources on a domain. Used with no parameters lists all machine accounts in a domain.

Options:

\\computer name Specifies the computer whose resource should be viewed
/domain:<domain name> The domain to be used
/network:<NetWare network> A NetWare network to be used