You can add, remove, disable, enable and change passwords of user accounts from the Control Panel. But you can do the same thing from command line. You must be an administrator and issue commands from an elevated command prompt window to do this. Here is how :
1. Adding a new user
You can easily add a new user by giving the following command. Here username is the user name of the new user and password is the new user’s password supplied by you manually.
For example : NET USER Romeo29 12345 /ADD. This would create a new user account with username Romeo29 and password as 12345. If you do not want to specify the password in the command line but want Windows to ask you, just replace the password with an asterisk in the command line like this :
This will make Windows ask you for a password. If you want Windows to generate a random password for you, then do no supply a password in the command line but append /RANDOM switch in the command line :
This will make Windows generate an eight character long password for you and display it. You should write down this randomly generated password.
2. Removing an exisiting user
You can easily remove a user account by giving the following command.
Here username is the user name of the existing user account you want to remove.
3. Disabling or enabling a user account
If a user account is not needed for now but may be needed in the future, then you can choose to disable it for present. Here is the command line give to disable a user account :
Here username is the user name of the existing user account you want to disable. If you want to enable a previously disabled account, then just replace no with yes, making the command line :
4. Listing all local user accounts
You can list all the local user accounts on your computer by giving this command :
Windows will show you a list of all accounts including the ones which are not shown in the Control Panel.
In this article, we touched only few basic functions of the NET USER command. For full range of functions that it provides, you can type NET HELP USER command at the command prompt.