The creation of individual user accounts enables each user to have customized settings, themes, document settings and more. The conventional way to do this is via “Control Panel”. However, account creation can also be done using the “Command Prompt”. In order to do so, you need to make sure that you have access to the Admin account of the Personal Computer (PC).
Please note: This process will not work if you do not have the Admin account credentials.
Assuming that you do have the credentials, this is how you can add/remove user accounts in Windows 10 with a command line.
- Right click on the “Start Menu” button and select “Command Prompt (Admin)” option from the menu or Press “Windows + X” buttons and then select “Command Prompt (Admin)” from the menu.
- If prompted for confirmation, click “Yes”.
- This will open the “Command Window”.
New User Account Creation
You can use this window to both add and/or remove user accounts. If you wish to add a user, use this command:
“net user UserName Password /add”
UserName = The username of the new account you wish to create.
Password = The password for the new user account.
For instance, if I need to create a new account with the name “Joe” and the password “joehatescandy”, I’ll use the code:
“net user Joe joehatescandy /add”
After you press enter, the Command Window will display the message: “The command completed successfully” signifying the successful creation of the desired user account.
Please note: In the above mentioned code the space between the Password and ‘/add’ is part of the syntax. If not used, the code will not execute correctly.
Tip: If you do not wish for the account password to be displayed, then you can use the following code:
“net user UserName * /add”
After you press “Enter”, the Command Window will ask you to type in the password twice and it will not be displayed on the screen.
Existing User Account Deletion
The deletion process is similar to the above mentioned addition process. In order to delete an existing user account, you need to know the name of the user account (case-sensitive). Assuming that you know the name of the user account, this is the code you’ll need to use to delete it:
“net user UserName /delete”
UserName = The name of the existing user account.
For instance, if I wish to delete the earlier created user account “Joe”, I’ll use the code:
“net user Joe /delete”
After typing the code press “Enter”. Once the process is completed the Command Window will display the message: “The command completed successfully” signifying the successful deletion of the user account.