If you’ve forgotten your Windows 10 password, don’t worry—you can reset or unlock it using Command Prompt. In this guide, I’ll show you the steps to regain access to your account efficiently and safely.

Scenario 1: When You Are Logged Into Windows 10

If you can still access your account, resetting the local admin password is straightforward. You just need to open Command Prompt with administrator privileges and run a few commands.

Steps:

  1. Open Command Prompt as an administrator. To do this, search for “cmd” in the Windows search bar, right-click on it, and select Run as administrator.
  2. Type the following command to reset the password:bashCopy codenet user <username> <newpassword>
    • Replace <username> with your admin account name.
    • Replace <newpassword> with the new password you want to set.
    Example:bashCopy codenet user AdminUser NewPassword123
  3. Press Enter, and the password will be successfully updated.

Scenario 2: When You Can’t Access Windows 10

If you’re locked out of your account and unable to log in, you can still reset the admin password by booting from a Windows 10 installation disk or USB. Here’s how you can do it without losing any data.

Steps:

  1. Prepare a Windows 10 Installation Disk:
    If you don’t have an installation disk, you can create one by downloading the Windows 10 ISO from Microsoft’s website and writing it to a USB or CD. To make a bootable pendrive click on me
  2. Boot the Computer from the Installation Disk:
    Insert the disk into the locked computer and restart it. You may need to change the boot order in your BIOS settings to boot from the USB or CD.
  3. Replace Utility Manager with Command Prompt:
    • Once the system boots, the Windows Setup screen will appear. Press Shift + F10 to open Command Prompt.
    • Enter the following commands to replace the Utility Manager with Command Prompt (replace c with your system drive letter if needed):bashCopy codemove c:\windows\system32\utilman.exe c:\ copy c:\windows\system32\cmd.exe c:\windows\system32\utilman.exe
    • After running these commands, remove the installation disk and restart the computer by typing:bashCopy codewpeutil reboot
    • Alternatively, you can manually power off and restart the system.
  4. Reset the Local Admin Password:
    • Once the system restarts, the login screen will appear. Click the Ease of Access icon to launch Command Prompt.
    • Enter the following command to reset the admin password:bashCopy codenet user <username> <newpassword>
    • You can also create a new local admin account by typing:bashCopy codenet user <newusername> /add net localgroup administrators <newusername> /add
  5. Restore the Utility Manager:
    For security, it’s essential to restore the Utility Manager. Follow these steps:
    • Boot the computer again from the Windows installation disk, press Shift + F10 to open Command Prompt, and type:bashCopy codecopy c:\utilman.exe c:\windows\system32\utilman.exe
    • Confirm the overwrite when prompted by typing Yes and hitting Enter.

Conclusion

By following the outlined steps, you can reset your Windows 10 admin password through Command Prompt. Make sure to restore the Utility Manager afterward to keep your system secure.