Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Reset Windows 10 Password with CMD

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can reset a Windows 10 password using Command Prompt (CMD), but only if you have a hidden administrator account enabled or a Windows 10 installation USB drive. The easiest method works when you're already logged in as a different admin user; the fallback method uses the installation media to replace the Utility Manager with Command Prompt. This guide covers both, step by step.

What You'll Need

  • Access to a Windows 10 PC (either logged in or at the login screen)
  • Another administrator account on the same PC (for Method 1)
  • A Windows 10 installation USB or DVD (for Method 2)
  • A second working computer to create the installation media if needed

Step-by-Step

Method 1: Reset Password from Another Admin Account (No USB Needed)

  1. Log in to Windows 10 using an account that has administrator privileges. If you only have the locked account, skip to Method 2.
  2. Right-click the Start button and select Command Prompt (Admin). If you don't see that, search for "cmd" in the Start menu, right-click it, and choose Run as administrator.
  3. In the Command Prompt window, type the following command and press Enter:
    net user
    This lists all user accounts on the PC. Note the exact username of the account whose password you want to reset.
  4. Type the following command, replacing USERNAME with the actual username and NEWPASSWORD with the new password you want to set:
    net user USERNAME NEWPASSWORD
    Example: net user John P@ssw0rd
  5. Press Enter. You should see the message "The command completed successfully."
  6. Close Command Prompt and log out. The user can now log in with the new password.

Method 2: Reset Password Using Windows 10 Installation Media (When You're Locked Out)

Warning: This method involves replacing system files. Follow exactly to avoid damaging your Windows installation. It does not delete personal files, but it temporarily disables the Utility Manager (ease of access) button on the login screen.

  1. On another computer, go to Microsoft's official download page and download the Media Creation Tool.
  2. Run the tool and choose Create installation media (USB flash drive, DVD, or ISO file). Follow the prompts to create a bootable USB drive (at least 8GB).
  3. Insert the USB drive into the locked PC and restart it. Boot from the USB (you may need to press a key like F12, F2, or Esc during startup to choose the boot device; the exact key varies by manufacturer).
  4. When the Windows Setup screen appears, press Shift + F10 to open Command Prompt.
  5. Type regedit and press Enter to open the Registry Editor.
  6. In Registry Editor, click on HKEY_LOCAL_MACHINE to highlight it. Then go to File > Load Hive.
  7. Navigate to the drive where Windows is installed (usually C:), then go to Windows\System32\config. Select the file named SYSTEM and click Open.
  8. When prompted for a key name, type temp and click OK.
  9. In the left pane, expand HKEY_LOCAL_MACHINE\temp, then navigate to Setup.
  10. In the right pane, double-click CmdLine. Change its value data to cmd.exe and click OK.
  11. Double-click SetupType. Change its value data to 2 and click OK.
  12. In the left pane, click on HKEY_LOCAL_MACHINE\temp again, then go to File > Unload Hive. Confirm with Yes.
  13. Close Registry Editor and Command Prompt. Click Next on the Windows Setup screen, then click Repair your computer in the bottom-left corner.
  14. Choose Troubleshoot > Advanced options > Continue (or just restart the PC normally by removing the USB).
  15. Windows will restart to the login screen. Click the Ease of Access icon (the clock with a person) in the bottom-right corner. This should open a Command Prompt window instead of the usual settings.
  16. In that Command Prompt, type net user and press Enter to see the list of accounts.
  17. Type net user USERNAME NEWPASSWORD (replace with the actual username and desired password) and press Enter.
  18. Close the Command Prompt. You should now be able to log in with the new password.
  19. After logging in, open Command Prompt as administrator and run the following command to undo the registry changes:
    reg add "HKLM\SYSTEM\Setup" /v SetupType /t REG_DWORD /d 0 /f
    and
    reg add "HKLM\SYSTEM\Setup" /v CmdLine /t REG_SZ /d "" /f
    This restores the normal boot behavior.

Common Mistakes

  • Typing the username incorrectly: The net user command is case-insensitive, but the username must match exactly (spaces and special characters included). Use the exact name shown in the list.
  • Using a password that doesn't meet complexity requirements: Windows may reject weak passwords (e.g., too short or all lowercase). Use a mix of letters, numbers, and symbols.
  • Not booting from the USB correctly: If you see the normal Windows login screen instead of the Setup screen, you didn't boot from the USB. Check the boot order in BIOS/UEFI.
  • Forgetting to unload the hive in Registry Editor: If you skip Step 12, the registry changes may not apply correctly. Always unload before closing.

Tips

  • Always create a password reset disk for your Microsoft account or a local account before you get locked out. For local accounts, you can use the "Create a password reset disk" feature in the Control Panel (requires a USB drive).
  • If your account is a Microsoft account (you use an email address to sign in), you can reset the password online at Microsoft's password reset page from any device. This is often easier than the CMD method.
  • Keep the Windows installation USB in a safe place; it can also be used for system repairs and recovery.
  • When using Method 2, make sure you remove the USB drive before the final restart to avoid booting into Setup again.

Troubleshooting

“Access denied” when running net user

You must run Command Prompt as administrator. If you're already logged in as a standard user, you won't have permission. Use an admin account or use Method 2.

The Ease of Access icon doesn't open Command Prompt

This means the registry changes didn't apply. Repeat Method 2 from Step 5, making sure you unload the hive correctly. Also check that you modified the correct SYSTEM file (the one in the Windows folder, not a backup).

“The user name could not be found” error

Double-check the username. If the account is a Microsoft account, the local username might be the first five characters of the email address (e.g., for john.doe@outlook.com, it might be john). Run net user to see the exact local names.

After reset, the password works but the account is locked or disabled

If the account was disabled, run this command in an admin Command Prompt: net user USERNAME /active:yes. If it was locked due to too many attempts, run net user USERNAME /active:yes as well (this also unlocks).

Method 2 leaves a black screen or boot loop

This is rare but can happen if you didn't undo the registry changes. Boot from the USB again, open Command Prompt with Shift+F10, and run the two reg add commands listed in Step 19 to restore the original values. If that doesn't fix it, use System Restore from the Advanced Options menu (if you have a restore point).

Frequently Asked Questions

Will this method work if I have a Microsoft account?

Yes, the net user command resets the local account password, which is what Windows uses for login even with a Microsoft account. However, the next time you connect to the internet, Windows may ask you to verify your Microsoft account password. If you don't know it, reset it online first.

Is it legal to reset a password this way?

Yes, as long as you own the computer or have explicit permission from the owner. Using this method on someone else's PC without permission is unethical and may be illegal.

Can I use this method to bypass a BitLocker-encrypted drive?

No. If your drive is encrypted with BitLocker, you'll need the BitLocker recovery key to access the system drive, even with the USB method. The CMD trick won't bypass it.

What if I don't have a Windows 10 installation USB?

You can create one for free using Microsoft's Media Creation Tool, which requires a blank USB drive of at least 8GB and an internet connection on another PC. Alternatively, you can use the built-in recovery options if you have a system repair disc or a recovery partition.

Will this erase my files?

No. Resetting the password with net user does not delete any personal files. However, the installation media method temporarily modifies system files, but it doesn't touch your documents, photos, or apps.

How do I avoid this situation in the future?

Create a password reset disk for local accounts (Control Panel > User Accounts > Create a password reset disk). For Microsoft accounts, set up security info (phone/email) so you can reset online. Also consider enabling Windows Hello PIN as a backup sign-in method.