When managing user accounts on a Windows PC, it often makes sense to use the Settings app. After all, it provides a graphical user interface that simplifies the process. But for those who’d rather manage the accounts with fewer clicks, they can use thenet usercommand in Command Prompt to manage user accounts on Windows.
In this guide, we’re going to show you how to use the net user command to perform various actions on user accounts on a Windows computer.

1. List All User Accounts
Before you start managing user accounts withnet user, it helps to know all the user accounts on your computer. To list them all,open Command Prompt as an administrator, enter the below command, and hit theEnterkey to run it:
Keep the names you see in mind, as you will need them as you use thenet usercommand.

2. Show All the Information of a User Account
you may also bring up all the important information about a user by simply typing thenet usercommand followed by the name of the user’s name. Here’s the basic syntax:
Let’s say there’s a user named “Jack” on the computer. To bring up their account information, you’d enter the below command, replacingUsernamein the above command structure withJack:

Once you run the command, you’ll be able to see, the user’s full name, when their password expires, when they last logged in, whether they’re an administrator, and more.
3. Add and Delete a User Account
To add a new user in Command Prompt, you need to use thenet usercommand followed by the name of the new account, the desired password you wish to set, and the/addswitch (this tellsnet userthat you’re adding a user). Here’s the basic syntax of the command:
Keep in mind that all you’ll be creating here is a local account, but you can alwaysswitch a local account to a Microsoft accountlater on. Here’s an example of the command in action:

After you run that command, you’ll see that the new user,Jill, has been added to your computer. To delete an account, just replace the/addswitch with/deletewithout specifying the password. Here’s how:
Now net user will remove the account from the computer.
4. Enable and Disable a User Account
If there’s a user you wish to temporarily restrict so they can’t access their account, you’re able to simply disable it instead of deleting it. Here’s the basic syntax of that action, making sure to use the/active:noswitch at the end of the command to tellnet useryou’re disabling it:
So, here’s an example of what disabling an account would look like after replacingUsernamewith the name of the actual user account:

And if you want to enable a disabled account, you just have to change the/active:noswitch to/active:yes.
5. Enable and Disable a Domain User Account
Sometimes, you might not want a user to access all the resources in a particular domain. The easier way to restrict them is to disable their account in that domain. You can do this by adding the/domainswitch to the syntax discussed in the previous section.
Here’s the syntax for disabling an account on a particular domain usingnet user, making sure to replaceUsernamewith the name of the user you want to disable:
If you want to enable an account on a domain, just use the/active:yesswitch in the above command structure instead.
6. Set User Account Login Times
If you want to specify the times someone can log in, you’re able to use the/timeparameter to specify the account login times. You can use the basic syntax below:
In the above command structure, replaceUsernamewith the user you want to limit the login times for, andlogin_timeswith a time range in the formatD-D,00:00. Here’s an example of how you’d do this:
As per the example above, that user can only log in from Monday to Friday between 9 a.m. and 5 p.m. If Jack tried to log in, he’d get a message sayingYour account has time restrictions that prevent you from signing in.
To remove the time restrictions, you’d use the below command:
Now Jack can go back to logging in whenever he wants.
7. Set User Account Expiry Date
By default, accounts are set to never expire, but you can change that if you have a user you want to be active for a specific period of time. You will need to use the/expiresparameter while specifying the year, month, and expiration date. Here’s the basic command structure:
An example of this in action would be:
With the above command, Windows will disable the on the date you’ve set above.
8. Change the Password of a User Account
you may also use thenet usercommand tochange the password of a user account in Command Prompt. This will make it so that you can quickly change the password of any local account with a single command, instead of having to do it through the Settings app, which requires many clicks.
The beauty of it is that you can also use it to change passwords for multiple accounts without leaving the Command Prompt window.
9. Change the Password of a Domain User Account
You can also change the password of a user on a domain by appending the/domainswitch at the end of the command for changing a user account. The syntax for this is as follows:
Again this has to be a local domain user account for this to work. So, if youchanged the user account from a Microsoft account to a local account, you’ll need to switch it back to use the command.
10. Set a Password Policy for Users
If you need a particular user to change the password during their next login, you can use thenet usercommand along with the/passwordchg:yesparameter (by default, the parameter is/passwordchg:no). Here’s the basic syntax:
Here’s an example of what that would look like in Command Prompt:
So, the next time Jack logs into the computer, he will get a prompt asking him to change his password before he can access his user account.
11. Set a Home Directory for Users
When creating a new user profile usingnet user, you’re able to set the home directory, which is where Windows will store the user’s personal files and settings. By default, Windows places the home directory of each user account inThis PC > Local Disk (C:) > Users. To change this withnet userduring account creation, the basic syntax is as follows:
A real-world example of this would be:
The above command will place the home directory ofJack, as it creates the account, in theD:\Other Users\Jackfolder.
Take Control of Your Computer’s Users Accounts With the Net User Command
Net user is a simple command to understand, allowing you to effectively manage your accounts from one location: Command Prompt. Of course, we haven’t covered everything here, as there are too many parameters and switches to cover in a single guide.
With that said, after you’ve understood how to perform thenet useractions we’ve covered, you’ll be on your way to managing accounts on Windows much quicker.