Displays user account information or adds and modifies user accounts.
net user [username [password | *] [options]] [/domain] net user [username {password | *} /add [options] [/domain][ net user [username [/delete] [/domain][
Parameters | |
---|---|
| |
Parameter | Purpose |
| |
None | Displays a list of user accounts on the local computer. |
[username] | Specifies the account name to add, delete, change, or view. |
[password] | Assigns a password to a new account or changes the password of an existing account. |
Parameters (continued) | ||
---|---|---|
| ||
Parameter | Purpose | |
| ||
* | Prompts for the password. | |
[/domain] | Performs the operation on the primary domain controller instead of locally. | |
/add | Adds a user account. | |
[/delete] | Deletes a user account. | |
[options] | Specifies any of the following options: | |
/active:{no | yes} | Enables or disables the account. | |
/comment:'text' | Adds comments to an account. | |
/countrycode:nnn | Specifies the Country/Region codes to be used for help and error messages. | |
/expires:{date | never} | Specifies the status of account expiration. | |
/fullname:'name' | Sets a user's full name rather than a username. | |
/homedir:path | Establishes the user's home directory. | |
/passwordchg:{yes | no} | Determines whether the users can change their passwords. | |
/passwordreq:{yes | no} | Specifies a password requirement. | |
/profilepath:[path] | Establishes the user's logon profile. | |
/scriptpath:path | Establishes the path for the user's logon script. | |
/times:{times | all} | Defines time frames in which the user is permitted to use the computer. For example: W,8AM-5PM; F,8AM-1PM. | |
/usercomment:'text' | Determines whether an administrator can change or add to the user comment. | |
/workstations:{computername [,…] | *} | Specifies up to eight workstations where the user is permitted to log on. |