The fastest way to regain access depends on what you remember
If you have forgotten the admin password on a Windows 10 machine, your options depend on whether you can still log in as a different user, whether you have a password reset disk, and whether the computer is connected to a Microsoft account. The quickest path is usually the password reset disk if you made one before you were locked out. If not, you can use another admin account on the same machine, or reset through your Microsoft account online. If none of those work, you will need to use the Windows 10 installation media and the command line.
Each method takes a different amount of time and requires different things you may or may not have on hand. This guide walks through each one in order of speed and ease, so you can find the one that matches what you have access to right now.
Key Takeaways
- A password reset disk created before you were locked out is the fastest way to regain access — you insert it and follow the on-screen prompts without needing the old password.
- If another admin account exists on the same computer, you can log in with that account and reset the forgotten password through Settings > Accounts > Other people.
- If your admin account is linked to a Microsoft account, you can reset the password online at account.microsoft.com, then use the new password to log in.
- If you have none of the above, you will need a Windows 10 installation USB or DVD and access to the command line to reset the password.
- The command-line method requires you to boot from installation media and type specific commands — it is the slowest option but works when everything else is unavailable.
Using a password reset disk you created earlier
If you created a password reset disk before you forgot the password, this is your fastest option. Insert the disk or USB drive into the locked computer, then click "Reset password" on the login screen. Windows will walk you through creating a new password without asking for the old one.
To create a reset disk for future use (so you do not face this problem again), log in as the admin user, open Control Panel, search for "password reset disk", and follow the wizard. You can use any USB drive or external drive — Windows will format it and store the reset information. Keep this disk in a safe place, separate from the computer.
Resetting the password from another admin account on the same computer
If a second admin account exists on the Windows 10 machine, log in with that account. Open Settings, go to Accounts, then select "Other people". Find the admin account you are locked out of and click it. Select "Reset password". You will not need the old password — Windows lets you set a new one when ready.
This method works only if you remember the password to the other admin account. If both accounts are locked, move to the next method.
Resetting through your Microsoft account online
If the admin account is linked to a Microsoft account (rather than a local account), you can reset the password without touching the computer. Go to account.microsoft.com on any device with internet access, click "Security" in the left menu, then select "Password security". Choose "Change your password" and follow the steps. You will need to verify your identity — Microsoft may ask you to enter a code sent to a backup email or phone number.
Once you have set a new password online, go back to the locked Windows 10 computer and log in with your Microsoft account email and the new password. This method is fast if you have access to the email or phone number linked to your Microsoft account. If you do not, Microsoft has account recovery options, but they can take longer.
Using Windows 10 installation media and the command line
If none of the above methods work, you will need a Windows 10 installation USB or DVD and another computer to create it. read the Windows 10 Media Creation Tool from microsoft.com, insert a blank USB drive into another computer, and follow the tool's steps to create installation media. This takes about 15 to 20 minutes.
Insert the installation media into the locked computer and restart it. Press a key (usually F12, Esc, or Del — the screen will tell you which) to boot from the USB or DVD instead of the hard drive. When the Windows Setup screen appears, press Shift + F10 to open the command prompt. Type the following commands in order, pressing Enter after each one:
- diskpart — opens the disk management tool
- list disk — shows all drives connected to the computer
- sel disk 0 — selects the main hard drive (usually disk 0; if your main drive is listed as disk 1, use that instead)
- list vol — shows all volumes on that disk
- sel vol X — select the volume that contains Windows (usually the largest one; replace X with its number)
- assign letter=Z — assigns the letter Z to that volume so you can access it
- exit — closes diskpart
Next, type these commands to access the Windows system files and reset the admin password:
- cd Z:\Windows\System32 — moves to the Windows system folder
- ren utilman.exe utilman.exe.bak — renames the Utility Manager file
- copy cmd.exe utilman.exe — copies the command prompt and names it utilman.exe
- exit — closes the command prompt
Remove the installation media, restart the computer normally, and log in to the login screen. Click the Ease of Access button (bottom left corner) — this will open a command prompt with admin privileges. Type net user administrator newpassword, replacing "newpassword" with the password you want to use. Press Enter. You can now log in with the username "administrator" and your new password.
After you log in, undo the changes you made: open Command Prompt as admin, type ren utilman.exe cmd.exe, then ren utilman.exe.bak utilman.exe, and restart. This restores the Utility Manager to its original state.
Preventing lockout in the future
Once you have regained access, take steps to avoid this situation again. Create a password reset disk and store it safely. If you use a Microsoft account, make sure your backup email and phone number are current — you can check this at account.microsoft.com. Consider using a password manager like Bitwarden or 1Password to store your admin password securely; these programs can generate strong passwords and keep them encrypted on your device.
If you manage multiple computers, write down the admin password in a physical location only you can access — a locked drawer or safe — rather than storing it in a text file on the computer itself. This takes a few minutes now and can save you hours of troubleshooting later.
Frequently Asked Questions
Will resetting the admin password delete my files?
No. Resetting the password does not touch your documents, photos, or any other files on the computer. You will still see everything in your user folder after you log in with the new password. Only the password itself changes.
What if I do not know whether my account is a Microsoft account or a local account?
On the login screen, look at the account name. If it is an email address, it is a Microsoft account. If it is just a name (like "Admin" or "John"), it is a local account. You can also check by going to Settings > Accounts > Your info on a computer where you can still log in.
Can I reset the password if the computer is not connected to the internet?
Yes, but only using the password reset disk method or the command-line method with installation media. The Microsoft account method requires internet access. If you do not have a reset disk and cannot get installation media, you will need to contact a local computer repair shop.
Is it safe to use the command-line method?
Yes, if it is your own computer. The command-line method works because Windows installation media has access to system files that the normal login screen does not. You are not hacking the computer — you are using built-in Windows tools to reset your own password. Do not use this method on a computer you do not own.
What if the installation media does not boot?
Restart the computer and watch the screen carefully for a message like "Press F12 to boot from USB" or "Press Del for BIOS setup". If you miss it, restart again and try pressing the key as soon as you see the manufacturer's logo. If the computer still will not boot from USB, try a DVD instead, or create the installation media on a different USB drive.