Reset a Windows 10 Password with Command Prompt (net user)

Command Prompt resets a local account’s password only from an administrator account you can already sign in to: you run net user followed by the account name and an asterisk, then type the new password. It cannot reset a password you cannot sign in with, and it does not touch Microsoft account passwords, which are reset online.

Getting past the sign-in of a PC that is not yours is not covered here.

What net user can and cannot do

net user is a built-in Windows command for viewing and changing user accounts on the local computer. Microsoft’s net user reference says the password parameter “assigns or changes a password for the user’s account.” That makes it useful in a few specific situations:

  • You manage a family or shared PC, and someone forgot the password to their local account. You sign in as the administrator and set a new one for them.
  • You want to change the password on your own local account from the command line.
  • Settings will not open, but Command Prompt as administrator still works.

It does not help in these cases:

  • You cannot sign in at all. The command runs inside Windows, so someone has to be signed in with administrator rights first.
  • The account is a Microsoft account (it signs in with an email address). That password lives with your Microsoft account online.
  • The PC belongs to an employer or school. Accounts there are usually managed by the organization, so ask its IT department.
  • You want to see the old password. net user sets a new one; it has no option that displays an existing password.

A note on Windows 10 itself: Microsoft says Windows 10 reached the end of support on October 14, 2025. The command works the same, but a PC without Extended Security Updates no longer gets security fixes, so a password reset is a good moment to plan the move to a supported version.

Check the account type and your rights first

Two quick checks save a failed attempt.

  1. Is the account local? On the sign-in screen, an account that shows an email address is a Microsoft account. A plain name with no email is usually a local account.
  2. Are you an administrator? Open Settings > Accounts > Your info. Administrator usually appears under your name if you have the rights. If you are not sure who on the PC is an administrator, logging in as administrator in Windows 10 explains how to tell.

Before you set a new password for someone else, talk to them. They will need the new password, and anything they had set up to sign in automatically may ask for it again.

Set a new password with net user

These steps use a sample account named SampleUser. Replace it with the real account name from step 4.

  1. Sign in to Windows 10 with an administrator account.
  2. Select the search box on the taskbar and type cmd.
  3. Right-click Command Prompt in the results, choose Run as administrator, then select Yes on the User Account Control prompt.
  4. Type net user and press Enter. Microsoft says this displays a list of all user accounts for the local computer. Note the exact spelling of the account you want.
  5. Type net user SampleUser * and press Enter. If the name has a space, put it in quotation marks, for example net user "Sample User" *.
  6. Type the new password and press Enter, then type it again when Windows asks you to confirm it. Nothing appears on screen while you type. Microsoft notes that the password “isn’t displayed when the user types it at the password prompt,” so this is expected.
  7. Wait for the message that the command completed, then close Command Prompt.
  8. Sign out, and have the account’s owner sign in with the new password. For a family PC, set a temporary password and have the account’s owner change it in Settings after signing in.
Administrator Command Prompt showing the net user command listing accounts and changing a local account password
(1) List the accounts with net user, then (2) set a new password with net user AccountName *. (Illustration)

Why the asterisk? Microsoft’s syntax also lets you type the password directly after the account name, but then it sits in plain view on the screen for anyone nearby. The asterisk tells net user to prompt for the password instead, which keeps it hidden.

Password rules and common errors

Microsoft’s reference sets two limits: a password “can have as many as 127 characters,” and it “must satisfy the minimum password length value that is set with the net accounts /minpwlen command.” An account name can have as many as 20 characters. The table explains the messages you are most likely to see. Microsoft’s net user page does not list these messages, so the exact wording on your PC may differ.

What you see Likely cause What to do
Access is denied Command Prompt was not opened as administrator, or your account is a standard account Close it and reopen with Run as administrator, or ask an administrator to do the reset
The user name could not be found The name does not match an account exactly Run net user again and copy the spelling; add quotation marks for names with spaces
The password does not meet the password policy requirements The password is shorter or simpler than the PC’s policy allows Choose a longer password; on a work PC, ask IT about the rules
The passwords do not match The two entries were typed differently Run the command again and type carefully, since nothing shows on screen

Change your own password instead

If the password you want to change is your own and you know the current one, you do not need Command Prompt.

  • Settings: Microsoft’s change or reset your Windows password page gives the path Settings > Accounts > Sign-in options, then Password > Change.
  • Ctrl + Alt + Delete: this opens the security screen where Windows lets you lock the PC, switch user, sign out or change a password.
  • Command Prompt: net user with your own account name and an asterisk works too, from an administrator Command Prompt.

If the account is a Microsoft account

net user cannot change a Microsoft account password. Microsoft’s page gives these routes instead:

  • At the sign-in screen, select I forgot my password and follow the prompts.
  • Or select Sign-in options, then Web sign-in, and choose Forgot my password.
  • From any browser, use the Reset password link on the same Microsoft change or reset page linked above and follow the prompts.

If you cannot sign in at all

This is where net user stops being useful, because nobody is signed in to run it. What still works depends on the account:

  • Local account with security questions: At the sign-in screen, select the arrow next to the password text field, select OK, then Reset password, and answer the security questions you set up when you created the account.
  • Another administrator on the same PC: that person signs in and follows the net user steps above for your account.
  • No other route: Microsoft’s recovery options page describes Troubleshoot > Reset this PC, where you “can choose to keep your personal files or remove everything.” Without a working account, expect to lose apps and settings, and back up anything you can first. If BitLocker is on, Microsoft notes you will need the BitLocker recovery key for most WinRE options. Factory resetting Windows without a password walks through it. Once you are back in, add a PIN in Settings > Accounts > Sign-in options and keep a second administrator account, so one forgotten password does not lock you out.

Microsoft also says its support staff cannot retrieve or get around a lost or forgotten password, so a reset is the end of the line for a local account with no recovery option. The full set of ways back in, account type by account type, is in what to do when you forget your Windows password. Related reading: recovering a Windows 10 password, whether Command Prompt can find the administrator password, resetting a forgotten Windows 11 password from the sign-in screen and a forgotten Windows 11 administrator password.

net user reset answers

Does net user work on Windows 11?

Yes, the command is part of Microsoft’s Windows commands reference and the steps are the same; open Terminal or Command Prompt as administrator. To give an account administrator rights there, see making yourself an administrator on Windows 11.

Can I use net user to add a new account instead?

Yes. The same command creates accounts with /add, again with an asterisk so the password is prompted. Creating a local account on Windows 10 covers that, and making a user an administrator with CMD covers promoting it.

Next step: sign in as the administrator, run net user to confirm the account name, and set the new password with the asterisk prompt.

When the password is fine but the account itself is locked out or disabled, see how to unlock a user account in Windows 10 instead of setting a new password.