You can reset a local account’s password on Windows 10 with Command Prompt, as long as you can open it as an administrator. Right-click Start, choose Command Prompt (Admin) or Windows PowerShell (Admin), and run net user to see the account names. Then run net user AccountName * and type the new password twice. This only works for local accounts. If you sign in with a Microsoft account (an email address), reset the password online at Microsoft’s account recovery page instead.
If you’re locked out and don’t have any administrator access, the command prompt method won’t work. The options for that situation are covered below.
Before you start
- You need admin rights. Either you’re signed in to an administrator account, or you know the password of another admin account on the PC.
- Check the account type. On the sign-in screen, an email address means a Microsoft account. A plain name means a local account.
- Know what you’ll lose. Resetting a local password with net user means that account loses access to some encrypted data, such as files protected with EFS, saved Wi-Fi and website passwords in some apps, and personal certificates.
Reset a local account password with Command Prompt
- Sign in with an administrator account.
- Right-click Start and choose Command Prompt (Admin) or Windows PowerShell (Admin). Click Yes on the User Account Control prompt.
- Type
net userand press Enter to list all accounts on the PC. - Type
net user AccountName *, replacing AccountName with the exact account name. Use quotes if it has a space, likenet user "Sam Lee" *. - Type the new password and press Enter, then type it again to confirm. Nothing appears on screen while you type. That’s normal.
- Sign out and sign in to the account with the new password.

You can also type the password right in the command, like net user Sam NewPass123, but using * is safer because the password doesn’t appear on screen or in your command history.
Other useful commands
- Remove a password entirely:
net user AccountName ""(not recommended). - Turn on the built-in Administrator account:
net user Administrator /active:yes. Set a strong password for it and turn it off again with/active:nowhen you’re done. - Make an account an administrator:
net localgroup Administrators AccountName /add.
If you use a Microsoft account
- On another device, go to account.live.com/password/reset.
- Enter your Microsoft account email, phone number, or Skype name.
- Verify your identity with a code sent to your recovery email or phone.
- Create a new password, then sign in to your PC with it. Make sure the PC is connected to the internet.
You can also click I forgot my password on the Windows sign-in screen to start the same process.
If you’re locked out of a local account
- Answer your security questions: On the sign-in screen, enter a wrong password once, then click Reset password and answer the questions you set up.
- Use a password reset disk: If you created one earlier, plug it in and click Reset password on the sign-in screen.
- Sign in with another admin account and use the Command Prompt steps above, or go to Control Panel > User Accounts > Manage another account > Change the password.
- Reset the PC as a last resort: On the sign-in screen, hold Shift, click Power > Restart, then choose Troubleshoot > Reset this PC. Choosing Remove everything erases all data, so only do this if you have backups.
Guides online sometimes suggest replacing system files to open a command prompt from the sign-in screen. That trick is a security bypass that Windows Defender now flags, it can damage your system, and it’s not something to use on a PC you don’t own.
Prevent this next time
- Switch to a Microsoft account, which you can recover online.
- Create a password reset disk: search Start for Create a password reset disk and follow the wizard with a USB drive.
- Add a PIN in Settings > Accounts > Sign-in options as a backup way to sign in.
- Keep a second administrator account with a password stored in a password manager.
Frequently asked questions
Why does net user say “Access is denied”?
Command Prompt isn’t running as an administrator. Close it, right-click it, and choose Run as administrator.
Why does net user say “The user name could not be found”?
The name doesn’t match exactly. Run net user to see the correct name, and use quotes for names with spaces.
Can I use net user to change a Microsoft account password?
No. Microsoft account passwords are managed online. Use the Microsoft account recovery page.
Does this work on Windows 11?
Yes. The same commands work in Windows 11. Open Terminal (Admin) from the Start button’s right-click menu.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.