How to Use Net User Command in Windows 11

Command Line Prompt

Learn how to easily manage user accounts on your computer or on a server using the Net User command line.

The ‘Net User’ command line is extremely useful when it comes to managing the user accounts in Windows 11. You can perform numerous actions with this command, such as adding a new user account or changing the password of an existing account, etc. But. in order for you to be able to use the Net User command, you must have administrator privileges.

The Net User command can be run in any native Windows command line interpreter like the Command Prompt or the Windows PowerShell. There are multiple parameters of the Net User command which can be used alongside the command. This guide will present you with a descriptive list of all the parameters and will also show you how you can easily execute these commands using the Command Prompt interface.

What is Net User Command and its Parameters

The Net User command and its parameters are essentially a tool. If you are an administrator on a network of computers, you can use the Net User command line to manage all the user accounts simply from the command prompt interface without needing to go through several Settings menus.

The parameters of this command line and its uses are as follows:

Parameter Action
net user If used without any other parameter, this command will present you with a list of usernames of the user accounts that are active on your computer. You can then use the usernames to pair with other parameters to perform different actions.
username When used alongside the net user command, it will show you each and every detail of the user. This parameter can be paired with other parameters to perform more actions.
/add You can use the /add parameter with the net user command to create a new user for your computer.
Example – ‘net user username /add’
Here, you need to replace the username with the name that you want to assign to the new account. You can also add a password to the new account.
Example – ‘net user username password /add’
Just replace the ‘username’ with a name and the ‘password’ with the password that you want to give to the account.
/delete The ‘/delete’ parameter can be used with the ‘username’ parameter to delete a specific user account from your computer.
Example – ‘net user username delete’
Just replace the ‘username’ with the name of the user which you want to remove from the computer.
password the ‘password’ syntax can be used with the username syntax to either change the password of an existing account or assign a new password to an account without a password.
* The ‘*’ parameter is used in place of the ‘password’ parameter. It can be used while creating a new user, assigning a new password, or changing an existing one. Once executed, it will create a prompt for you to enter the password in the command prompt window.
Example – ‘net user Mike * /add’
/domain The ‘/domain’ parameter is added to the command line to change the action of the command line to take effect on a domain in place of a local computer. This command is useful for server or workstation administrators.
Example – ‘net user Mike /domain /add*
/help The ‘/help’ parameter gives you a list of all available parameters and short descriptions of what they do inside the Command Prompt window.
Example – ‘net user /help’
/active:{yes | no} Use the /active parameter with the ‘yes’ or ‘no’ suffix to either activate or deactivate a user. A deactivated user will not be able to access the server that the computer is a part of.
/comment The ‘/comment’ parameter is used to add a comment to a user account.
/passwordchg:{yes | no} You can use the ‘/passwordchg’ parameter with the ‘yes’ or ‘no’ suffix to give a user the ability to change their sign-in password.

There are many more parameters available and you can combine them and do all sorts of stuff. These are the few main ones that you might use often. Now the guide will show you a few examples of how the Net User command is executed.

Adding a New User with Password

First, type ‘Command Prompt’ in Start Menu search, right-click on the app from search results, and then select ‘Run as Administrator’.

Once the Command Prompt window appears, copy & paste the following command in the command line and press Enter.

net user username password /add

You have to replace the ‘username’ part of the command line with the name that you want to give to the account and the ‘password’ with a password that will be used to sign into the account.

If you do everything correctly, after pressing Enter it will show ‘The command completed successfully’ in the next line.

Now, if you click on the Start button located on the Taskbar and then click on your username, you will see that the new account is listed below the ‘Sign out’ option.

Note: Remember that accounts added by this method will be local accounts.


Removing a User

To delete a user account using the Net User command, first, open up the Command Prompt in administrator mode by searching for it in Start Menu search, right-clicking on it from search results, and then selecting ‘Run as administrator’.

This image has an empty alt attribute; its file name is allthings.how-how-to-use-net-user-command-in-windows-11-image.png

Once the Command Prompt window opens up, type the following command inside the command line and press Enter on your keyboard.

net user username /delete

You have to replace the ‘username’ in the command line with the user account you want to remove from your computer.

After you successfully remove a user you will see it will no longer appear in the Sign-in options.


Checking Details of a User

Checking the details of a particular user is very simple. Start by opening the Command Prompt window in Administrator mode from the Start Menu search. Once the Command Prompt window appears, type net user inside the command line and press Enter on your keyboard.

You will be presented with a list of all the current user accounts on your computer.

Now, all you have to do is to type ‘net user *username*’ in the next command line and hit Enter one more time. Just replace the username part with the name of the user account and you will be presented with detailed account information of that account.


Changing Password of a User Account

First, type ‘Command Prompt in the Windows search, right-click on it from search results, and select ‘Run as administrator’.

This image has an empty alt attribute; its file name is allthings.how-how-to-use-net-user-command-in-windows-11-image.png

Once the Command Prompt window opens, type the following command and then press Enter.

net user *username* *password*

Replace the username with the name of the account of which you want to change the password and the password with the new password that you want to assign to the account.

Now if you try to sign in to the account you will have to use the new password.