How to Create a User in Windows Server Through CMD

Published January 15, 2025
How to Create a User in Windows Server Through CMD
Cheap Dedicated Server

How to Create a User in Windows Server Through CMD


Managing users in Windows Server is a fundamental task for administrators. While most tasks can be performed through the graphical interface, using the Command Prompt (CMD) provides a faster and more efficient way to manage users, especially in environments where automation is key.

In this blog, we’ll guide you through the process of creating a user account in Windows Server using CMD.


Steps to Create a User Account in CMD

  1. Open Command Prompt with Administrator Privileges
    • Press Win + R, type cmd, and press Ctrl + Shift + Enter to open CMD as an administrator.
  2. Use the net user Command
    • The net user command is used to manage user accounts in Windows. The syntax to create a new user is as follows:
      net user <username> <password> /add

       use net user

  3. Example Command
    • To create a user named JohnDoe with the password P@ssw0rd123, use the command:
      net user JohnDoe P@ssw0rd123 /add

      example command

  4. Verify the User Account
    • After creating the user, you can verify its existence by running:
      net user

      Verify the User Account

    • This will list all user accounts on the server.
  5. Additional Options (Optional)
    • To assign the user to a specific group, use the net localgroup command. For example, to add JohnDoe to the Administrators group:
      net localgroup Administrators JohnDoe /add

      Additional Options

  6. Password Settings
    • To set options such as forcing the user to change their password at the next logon, use:
      net user JohnDoe /logonpasswordchg:yes

      Password Settings

  7. Delete a User (Optional)
    • To remove a user account, use:
      net user <username> /delete

      Delete a User


Best Practices

  • Always use strong passwords to enhance security.
  • Regularly audit user accounts to ensure compliance with organizational policies.
  • Restrict unnecessary administrative privileges.
 

 

How to Create a User in Windows Server Through CMD​ (F.A.Q)

 

Can I create a user without assigning a password?

Yes, use the command net user <username> /add to create a user without a password. However, this is not recommended for security reasons.

How can I check the details of a specific user account?

Use the command net user <username> to view detailed information about the user account.

Can I create multiple users at once using CMD?

CMD does not natively support batch user creation, but you can use a batch script to automate the process.

What permissions are required to create a user?

You need to have administrative privileges on the server to create user accounts.