Skip to content

Instantly share code, notes, and snippets.

@detain
Last active July 7, 2022 17:19
Show Gist options
  • Save detain/b07721b309d0b072ea02d73180ed611e to your computer and use it in GitHub Desktop.
Save detain/b07721b309d0b072ea02d73180ed611e to your computer and use it in GitHub Desktop.
Reset Forgotten Password in Windows 10 / 11

How to reset forgotten password on Windows 10

To regain access to your account after forgetting your password, create a Windows 10 USB media, and then use these steps:

Important: Before proceeding to reset your password in Windows 10, note that this workaround only works with local accounts, not when using a Microsoft Account. If this is your case, you'll need to use the online Microsoft password recovery tool. On the page, you will be greeted with the "Why can't you sign in?" question, where you would choose the "I forgot my password" option. Then the online form will guide you through the different ways to verify that you are "you", by using a secondary email, sending an SMS text to your phone, and other methods to recover your password.

  1. Start computer with Windows 10 USB bootable media.

    Quick note: To start your device with a bootable media, you may need to change the BIOS or UEFI settings. This process usually requires pressing one of the function keys (F1, F2, F3, F10, or F12), the ESC, or the Delete key. For more accurate instructions, visit your PC manufacturer's support website.

  2. On the Setup page, use the Shift + F10 keyboard shortcut to open Command Prompt.

    Command Prompt on Windows Setup

  3. Type the following command to move from the X:\Sources folder to the root folder of your Windows 10 installation and press Enter:

    C:

    In the command, we're using C: because it's usually the drive letter to access the hard drive after booting the device with USB, but you may need to play around to find the right drive letter. You can confirm the location using the dir command. If the result shows the "Programs Files" as well as "Windows" folders, then you're in the correct location.

  4. Type the following command to navigate to the System32 folder and press Enter:

    cd Windows\System32

  5. Type the following commands to replace the Utility Manager button with direct access to Command Prompt from the Sign-in screen and press Enter (on each line):

    ren utilman.exe utilman.exe.bak ren cmd.exe utilman.exe

    Utilman.exe to cmd.exe commands

  6. Type the following command to restart your computer normally and press Enter:

    wpeutil reboot

  7. In the Sign-in screen, click the Utility Manager button in the bottom-right corner to open Command Prompt.  

  8. Type the following command to enable the built-in Administrator account and then press Enter:

    net user Administrator /active:yes

    Enable hidden Administrator account

  9. Click the Power button in the bottom-right corner and select the Restart option.

  10. In the Sign-in screen, select the Administrator account.

    Windows 10 account list

  11. Open Start.

  12. Search for Computer Management and click the top result to open the app.

  13. Expand the Local Users and Groups branch.

  14. Expand the Users branch.

  15. Right-click the account you want to reset the password and select the Set password option. 

  16. Specify the new password.

  17. Click the OK button.

    Computer Management reset password

  18. Sign out from the Administrator account.

  19. Sign back in using the account with the new password.

  20. Restart the device using the Windows 10 USB bootable media again.

  21. On the Setup page, use the Shift + F10 keyboard shortcut to open Command Prompt.

  22. Type the following command to move to the root folder of your Windows 10 installation and press Enter:

    C:

  23. Type the following command to navigate to the System32 folder and press Enter:

    cd Windows\System32

  24. Type the following commands to replace the Utility Manager button with direct access to Command Prompt from the Sign-in screen and press Enter (on each line):

    ren utilman.exe cmd.exe ren utilman.exe.bak utilman.exe

    cmd.exe to utilman.exe commands

  25. Type the following command to disable the Administrator account and press Enter:

    net user Administrator /active:no

    Command Prompt disable administrator account

  26. Type the following command to restart the computer normally and press Enter:

    wpeutil reboot

Once you complete the steps, you can regain access to your account normally.

It's important to note that this method should work as long as you're trying to reset the Windows 10 password from a local account without any kind of encryption. If you use any sort of encryption, such as BitLocker, you will need the original password to get access to the account. Otherwise, you may lose your data.

We're focusing this guide on Windows 10, but you can use the same instructions on Windows 8.1, Windows 7, and older operating system versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment