Reset Windows 11 Password Using CMD
In this article
Yes, you can reset a Windows 11 password using Command Prompt (CMD), but only if you have signed in with a local account (not a Microsoft account) and you have access to another administrator account on the PC. If you use a Microsoft account, you must reset the password online instead. This guide walks you through the CMD method, which involves booting into the Windows Recovery Environment and replacing the Utility Manager with Command Prompt to reset the password.
What You'll Need
- Access to a Windows 11 PC where you have another administrator account (or you can boot from a Windows 11 installation USB).
- Your Windows 11 installation media (USB or DVD) if you don't have another admin account.
- Basic familiarity with typing commands in Command Prompt.
Step-by-Step
- Boot into the Windows Recovery Environment (WinRE). Restart your PC. As it boots, press and hold the Shift key and click Restart from the sign-in screen (or from the Start menu if you're already signed in). If you can't get to the sign-in screen, use the installation USB: boot from it, select your language, and click Next, then click Repair your computer in the bottom-left corner.
- Open Command Prompt from WinRE. In the blue WinRE menu, go to Troubleshoot > Advanced options > Command Prompt. A black window will open.
- Identify the drive letter of your Windows installation. In the Command Prompt, type
diskpartand press Enter. Then typelist volumeand press Enter. Look for the volume with the label Windows or the one with the largest size (usually C:). Note its drive letter (e.g., C:). Typeexitto leave diskpart. - Back up the original Utility Manager. Type the following command (replace
C:with your actual drive letter) and press Enter:copy C:\Windows\System32\Utilman.exe C:\Windows\System32\Utilman.exe.bak - Replace Utility Manager with Command Prompt. Type:
copy /y C:\Windows\System32\cmd.exe C:\Windows\System32\Utilman.exe
Press Enter. This copies cmd.exe over Utilman.exe. - Close Command Prompt and reboot. Type
exitand press Enter. Then click Continue (or restart your PC normally). - Open Command Prompt from the sign-in screen. On the login screen, click the Ease of Access icon (the little person with a clock or accessibility symbol) at the bottom-right corner. This will now launch Command Prompt instead of the usual accessibility tools.
- Reset the password. In the Command Prompt, type the following command (replace
usernamewith the actual username of the account you want to reset):net user username newpassword
Press Enter. You should see “The command completed successfully.” - Close Command Prompt and sign in. Type
exitand press Enter. Now you can type your new password on the login screen. - Restore the original Utility Manager (important). After you sign in, open Command Prompt as administrator (right-click Start > Terminal (Admin) or search for “cmd” and choose Run as administrator). Then type:
copy /y C:\Windows\System32\Utilman.exe.bak C:\Windows\System32\Utilman.exe
Press Enter. This puts the real Utility Manager back.
Common Mistakes
- Using the wrong drive letter. If you don't check the actual drive letter, the copy command may fail because the Windows partition isn't always C: in WinRE.
- Typing the username incorrectly. The
net usercommand is case-insensitive but must match the exact username. If you're unsure, typenet useralone to list all accounts. - Forgetting to restore Utilman.exe. If you leave the modified Utility Manager in place, anyone can click the Ease of Access icon and get a command prompt with system privileges—a security risk.
- Using this on a Microsoft account. This method only works for local accounts. If you use a Microsoft account, the password is tied to your online account and cannot be reset this way.
Tips
- Write down your new password somewhere safe, or better yet, use a password manager.
- If you have BitLocker enabled, you may be prompted for the recovery key when booting into WinRE. Have it ready (it's usually stored in your Microsoft account or on a USB).
- If you have another admin account, you can reset the password from that account without the CMD trick: go to Settings > Accounts > Other users, select the account, and click “Change password”.
- Always test the new password before restoring Utilman.exe, so you don't get locked out.
Troubleshooting
“Access is denied” when running net user. Make sure you're running Command Prompt as administrator. In WinRE, the command prompt usually has full privileges, but if you're doing this from a normal admin account, right-click and choose “Run as administrator”.
The Ease of Access icon doesn't open Command Prompt. This usually means the copy command didn't work. Double-check the drive letter and that you used the correct paths. Try the copy command again in WinRE.
You can't boot into WinRE. If Shift+Restart doesn't work, use a Windows 11 installation USB. If you don't have one, you can create it on another PC using Microsoft's Media Creation Tool.
BitLocker asks for a recovery key. You'll need the 48-digit recovery key. It's often stored in your Microsoft account under Devices, or on a USB you saved when BitLocker was enabled.
You forgot your Microsoft account password. This method won't help. Instead, go to the Microsoft password reset page (account.live.com/password/reset) from any device and follow the instructions.
Frequently Asked Questions
Can I reset a Microsoft account password using CMD?
No. Microsoft account passwords are stored online and cannot be changed locally. You must reset them via Microsoft's website.
Will this work if I only have one account on the PC?
Yes, because you're using WinRE to bypass the login screen entirely. You don't need another admin account.
Is this method safe?
It's safe if you follow the steps exactly and restore Utilman.exe afterward. Leaving the modified file in place is a security risk.
What if I don't have a Windows 11 installation USB?
You can create one on another PC using Microsoft's Media Creation Tool. Alternatively, you can try the Shift+Restart method if you can reach the sign-in screen.
Can I use this to reset the password of another user account?
Yes, as long as you know the exact username. Type net user in the command prompt to see all accounts.
What if I get “The user name could not be found”?
You likely typed the username incorrectly. Use net user to list all accounts, then copy the exact username.