How To Use The Net User Command In Windows (2026)
Net user is a built-in Windows command for viewing and managing user accounts from the command line.
You can list accounts, add or remove one, and turn an account on or off.
This guide sticks to the parameters Microsoft documents.
Table of Contents
- Net user quick answer
- What the net user command does
- Before you start
- List accounts and view one account
- Add a user account
- Password rules
- Delete a user account
- Disable or enable an account
- Limit sign-in hours with /times
- Account options
- A full example from Microsoft
- Set an expiration date
- Restrict where an account can sign in
- Local account or domain account
- Syntax forms
- Related guides
- Sources
- More Windows guides
Net user quick answer
Run net user in Command Prompt to list the user accounts on the PC, and net user followed by a name to see that account.
Add /add, /delete or /active to change an account.
| Goal | Command |
|---|---|
| List all local accounts | net user |
| Show one account | net user tommyh |
| Add an account | net user jays * /add |
| Delete an account | net user jays /delete |
| Disable an account | net user jays /active:no |
| Enable an account | net user jays /active:yes |
What the net user command does
Microsoft says the net user command adds, modifies or deletes user accounts and displays detailed information about them.
It works on a local computer or on a domain.
Microsoft lists Windows 11 and Windows 10 among the systems it applies to.
Before you start
Changing accounts can lock people out, so check the name you type before you press Enter.
Microsoft says a user name can have as many as 20 characters.
- Select Start and type Command Prompt.
- Open the Command Prompt result.
- Type the command you need and press Enter.
List accounts and view one account
Running net user with nothing after it displays a list of all user accounts for the local computer.
net userAdd a user name to display information about that one account, as in Microsoft’s example for the account TommyH.
net user tommyh
Add a user account
The /add parameter adds a new user account.
Without /domain the account is created on the local machine, and with /domain it is created on the domain instead.
- Open Command Prompt.
- Type
net user jays * /addand press Enter. - Type the password when prompted and confirm it.
Microsoft says an asterisk in place of the password gives you a prompt, and the password is not displayed as you type it.
Replace jays with the user name you want.
Password rules
Microsoft states that a password must meet the minimum length set with the net accounts /minpwlen command.
A password can have up to 127 characters.
Typing the password directly in the command shows it on screen and in your command history, so the asterisk prompt is the safer choice.
Delete a user account
The /delete parameter deletes the specified user account.
With /domain the account is deleted from the domain rather than the local machine.
net user jays /deleteCheck the name first by running net user to list the accounts.
Disable or enable an account
The /active parameter turns an account on or off.
Microsoft says an inactive account cannot access resources on the computer, and the default is yes.
| Command | Result |
|---|---|
net user jays /active:no | Account is disabled |
net user jays /active:yes | Account is enabled |
Limit sign-in hours with /times
The /times parameter sets the days and times when a user can sign in.
Times must be in one-hour increments, days can be spelled out or abbreviated (M, T, W, Th, F, Sa, Su), and hours can use 12-hour or 24-hour format.
Use all to allow sign-in at any time, or leave the value blank to prevent sign-in entirely.
Separate days and times with commas and separate several entries with semicolons, with no spaces in the time.
net user miked /times:M-F,8AM-5PMMicrosoft’s own examples on that page write /time, while its syntax and parameter table define /times, so use /times.
Account options
| Option | What it does |
|---|---|
| /comment:”text” | Adds a comment of up to 48 characters in double quotes |
| /fullname:”name” | Sets the full name instead of the user name |
| /expires:date or never | Sets the account expiration date; never is the default |
| /homedir:path | Sets the home directory path, which must exist |
| /passwordchg:yes or no | Whether users can change their own password; default yes |
| /passwordreq:yes or no | Whether the account must have a password; default yes |
| /profilepath:path | Sets the sign-in profile path |
| /scriptpath:path | Relative path to the sign-in script |
| /usercomment:”text” | Lets an administrator add or change the user comment |
| /workstations:names or * | Up to eight computers the user can sign in from |
| /countrycode:NNN | Selects language files for help and error messages; 0 is the default |
A full example from Microsoft
Microsoft shows how to add an account for Jay Samson with sign-in rights from 8 AM to 5 PM, Monday through Friday, a mandatory password and the full name.
net user jays Cyk4^g3B /add /passwordreq:yes /times:monday-friday,8am-5pm /fullname:"Jay Jamison"That example puts the password in the command, so use the asterisk prompt on your own PC.
Set an expiration date
The /expires option sets the date when the account expires, or never, which is the default.
Microsoft says the account expires at the beginning of the date you give.
The month can be a number, a full name such as January or a three-letter abbreviation such as Jan, and the year can have two or four digits.
Use commas or slashes as separators and no spaces, and note that the date format depends on the country or region code.
net user jays /expires:never
Restrict where an account can sign in
The /workstations option lists up to eight computers from which the user can sign in to the network, separated by commas.
If you leave the list out or use an asterisk, the user can sign in from any computer.
Local account or domain account
| Command ends with | Where it runs |
|---|---|
| Nothing extra | On the local computer |
| /domain | On the domain controller in the computer’s primary domain |
Microsoft says /domain applies the operation to the domain instead of the local machine.
Syntax forms
| Form | Use |
|---|---|
net user [UserName {Password | *} [Options]] [/domain] | View or modify |
net user UserName {Password | *} /add [Options] [/domain] | Add |
net user UserName [/delete] [/domain] | Delete |
net user username [/times:{times | all}] | Set sign-in hours |
net user username [/active:{yes | no}] | Enable or disable |
Related guides
For another command that works with other PCs, read our Net Use command guide for the sister command that connects to shared resources.
You can also open PowerShell and check its version if you prefer working there.
Our Tasklist and Taskkill guide covers another everyday Windows command-line tool.
Sources
Microsoft Learn: net user.
Microsoft Learn: Command-Line Syntax Key.
More Windows guides
- How To Install .NET Framework 3.5 On Windows 11 (2026)
- How To Uninstall ESET From Windows Step By Step (2026)
- How To Uninstall Kaspersky Completely From Windows (2026)
- Local Security Authority Protection Is Off In Windows 11 (2026)
- How To Use Ping And Tracert In Windows 11 (2026)
- How To Change UAC Settings In Windows 11 (2026)
See all: Windows 11 Guides