Create a new user using cmd
To create a new user using the Command Prompt (Cmd) in Windows, you can follow these steps:
Method 1: Using the built-in net user
command
- Open the Command Prompt (Cmd) by searching for "Cmd" in the Start menu or by typing "Cmd" in the Run dialog box (Windows key + R).
- Type the following command and press Enter:
net user <username> /add
Replace
<username>
with the desired username for the new account.
For example:
net user john /add
This will create a new user account with the username "john".
Method 2: Using the useradd
command (Windows 10 and later)
- Open the Command Prompt (Cmd) by searching for "Cmd" in the Start menu or by typing "Cmd" in the Run dialog box (Windows key + R).
- Type the following command and press Enter:
useradd /create /name:<username>
Replace
<username>
with the desired username for the new account.
For example:
useradd /create /name:john
This will create a new user account with the username "john".
Method 3: Using the dsadd
command (Windows Server and later)
- Open the Command Prompt (Cmd) by searching for "Cmd" in the Start menu or by typing "Cmd" in the Run dialog box (Windows key + R).
- Type the following command and press Enter:
dsadd user <username>
Replace
<username>
with the desired username for the new account.
For example:
dsadd user john
This will create a new user account with the username "john".
Note: You may need to run the Command Prompt as an administrator to create a new user account. To do this, right-click on the Start button and select "Run as administrator" or use the "Run as administrator" option in the Command Prompt's context menu.