How to Control Windows User Accounts with NET USER Command

Managing user accounts in Windows is a crucial skill for system administrators, IT professionals, and even regular users who want more control over their computers. The NET USER command in Command Prompt (CMD) allows you to manage users, change passwords, promote or demote users, and even delete accounts—all without using the graphical interface.

In this guide, you’ll learn step-by-step how to use the NET USER command to control user accounts efficiently.


How to Use NET USER Command in Windows

The NET USER command is a built-in Windows tool that allows you to:

  • View all user accounts on your system
  • Create new user accounts
  • Change or reset passwords
  • Modify user privileges (make users admins or remove admin rights)
  • Delete user accounts

To start, follow these steps to open the Command Prompt (CMD) in Windows.

Step 1: Open Command Prompt (CMD) as Administrator

To use the NET USER command effectively, you need to run CMD with administrator privileges.

Method 1: Using Windows Search

  1. Press Win + S, type Command Prompt, and right-click it.
  2. Click Run as administrator.
  3. If prompted, click Yes on the User Account Control (UAC) dialog.

Method 2: Using the Run Box

  1. Press Win + R, type cmd, and press Ctrl + Shift + Enter.
  2. This launches CMD with administrator rights directly.

What is the NET USER Command in Windows CMD?

The NET USER command allows you to manage user accounts via the command line. The basic syntax is:

net user [Username] [Password] [options]

If you run the command without options, it will display all available user accounts on the system.

Example:

net user

This command lists all users registered on your Windows system.


How to Create a User with NET USER Command

To create a new user, use the following command:

net user NewUsername NewPassword /add

Example:

If you want to create a user named Alex with the password SecurePass123, type:

net user Alex SecurePass123 /add

If you don’t want to set a password initially, use:

net user Alex /add

This creates the user Alex, and Windows will prompt them to create a password when they log in.


How to Change a User Password Using NET USER Command

If you need to reset a user’s password, use this command:

net user Username NewPassword

Example:

To change the password for John to MyNewPass456, type:

net user John MyNewPass456

Tips:

  • If the username contains spaces, enclose it in quotes: net user "John Doe" NewPassword
  • To remove the password, enter: net user John ""
  • If you receive an “Access Denied” error, ensure CMD is running as an administrator.

How to Check If an Account Is an Admin Using NET USER Command

To check if a user is an administrator, use this command:

net localgroup administrators

This displays all users in the Administrators group. If a username appears in the list, it means the account has admin rights.


How to Add a User to the Administrator Group with NET USER Command

To promote a standard user to an administrator, use:

net localgroup administrators Username /add

Example:

To make John an administrator, type:

net localgroup administrators John /add

Now John has full admin access. To confirm, re-run the Step 6 command.


How to Remove a User Account Using NET USER Command

If you want to delete a user account completely, use:

net user Username /delete

Example:

To remove Alex from the system:

net user Alex /delete

Warning: This permanently deletes the account and all associated files, so be sure to back up important data before proceeding.


NET USER Command Not Working – How to Fix It

If the NET USER command is not working, try these troubleshooting steps:

1. Ensure CMD is Run as Administrator

Many user management commands require elevated permissions. Use Step 1 to open CMD properly. To do this open the run box by pressing the Winkey + R on the keyboard. Type in cmd and don’t press any buttons, hit CTRL SHIFT ENTER on the keyboard to open as admin.

2. Check for Typing Errors

Ensure that the command syntax is correct. If the username has spaces, use quotes:

net user "John Doe" NewPassword

3. Check Group Policies

In some cases, Group Policy settings may restrict the use of this command. You may need to modify permissions in Local Security Policy (secpol.msc).

4. Try a Different Command

If net user fails, try:

wmic useraccount get name

This will display all user accounts and verify if the issue is account-related.


How to Manage Local User Accounts in Windows Using NET USER Command

The NET USER command provides additional options for managing accounts, such as:

1. Disable an Account (Without Deleting It)

If you want to temporarily disable a user account, use:

net user Alex /active:no

To re-enable it, use:

net user Alex /active:yes

2. Force a User to Change Password on Next Login

To require a user to set a new password at their next login:

net user Alex /logonpasswordchg:yes

3. List All Administrators on the System

To get a list of all admin accounts, type:

net localgroup administrators

4. Log Off a User

To force a user to log off immediately:

shutdown /l

The /l switch means “log off.”

Video – How to Control Windows User Accounts with NET USER Command


Conclusion

The NET USER command is a powerful tool for managing Windows user accounts efficiently. Whether you need to create, modify, promote, or delete accounts, using CMD gives you full control.

Key Takeaways:

Use net user to list all users.
Change passwords with net user Username NewPassword.
Promote users with net localgroup administrators Username /add.
Remove accounts with net user Username /delete.

This guide provides everything you need to control Windows accounts using the NET USER command.

Have questions? Drop a comment below!


Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *