Create new user from command prompt
To create a new user from the Command Prompt in Windows, you can use the net user
command. Here are the steps:
- Open the Command Prompt as an administrator. To do this, right-click on the Start button and select "Command Prompt (Admin)".
- Type the following command and press Enter:
net user <username> /add
Replace
<username>
with the name you want to give to the new user.
For example, if you want to create a new user named "john", you would type:
net user john /add
- You will be prompted to enter a password for the new user. Type the password and press Enter.
- You will then be prompted to confirm the password. Type the password again and press Enter.
- The new user will be created and added to the system.
Note: You can also use the net user
command to modify existing user accounts. For example, you can use the /delete
option to delete a user account, or the /change
option to change a user's password.
Here are some examples of other options you can use with the net user
command:
net user <username> /delete
: Deletes the specified user account.net user <username> /change
: Changes the password for the specified user account.net user <username> /active:yes/no
: Enables or disables the specified user account.net user <username> /expires:<date>
: Sets the expiration date for the specified user account.