How to Reset Windows 10 Password with Command Prompt

recover windows 10 forgotten password

So you sit for an important work to carry on your computer. You enter the password on the sign in page, it displays "incorrect password". You enter it again, and the same ominous notification comes to display again. No matter how many times, the access to your very own system is not granted. That may sound odd, but it happens. When you are using the account after a long time, the possibility of forgetting the password is quite obvious.

Password restrictions are put on computers to prevent unwanted access to your computer by some trespassers. You may not even want kids to eavesdrop into your system, so you restrict their reach by password protection. By no means, it does give you a sense of security, but once you lose it, it is a dead serious issue. There are many ways, with or without software, both offline and online which can be implemented to gain back access to your computer, by recovering, resetting or bypassing the password restriction.

The article below will guide step by step with proper instructions. So better stick to it!

Case 1. When You're Signed into Windows 10

Now if you're already logged in your Windows 10 with admin account,  it's something as simple as the fact that you can directly run the command prompt or Powershell with administrator privilege, the replace with the name of your admin account and replace with the new password you want. For the Windows 10 users, follow the steps below to reset windows 10 admin password with command prompt.

Step 1. You can type PowerShell in Run prompt and hit Enter. Or right click the Windows 10 start menu and select the 'Windows PowerShell (Admin)' from  on this context menu.

windows powershell

Step 2. Then in the PowerSehll window you have to type the "Net user" command to show all the registered account on your Windows 10. Press Enter.

net user

Step 3. You can select any account you want to reset, here we will choose admin as an example. Continue to type the command "net user username password" without quotation marks. It is important to notice that "username" should be replaced with the name of admin account and password is your new password.

net user

When done using the command prompt, close it and restart your computer, then you can login your Windows 10 with the newly created password, it should be noted that this method only works if you're logged in Windows with administrator privileges.

Case 2. When You Can Not Sign into Windows 10

But sometimes, it poses a potential risk as there is a possibility that the password can be lost or forgotten. But if you're unlucky to forgot Windows 10 admin password, there is still a chance of resetting Windows 10 admin or user password without logging in, We can run certain commands and interprets the tasks associated with each command line to actually do the task. It is quite handy, but if you are a novice, and have not much information about handling cmd codes, better refrain from it.

Reset Windos 10 Password with Command Promopt + REGEDIT

We know there are lots of third-party tools like Hiren'sBootCD, Ophrack can do this, but we can try a challenging way to bypass Windows 10 password. This part I will try to reset Windows 10 password by modifying the Registry Editor based on command prompt.

Test machine

Successfully Tested On: Windows 7 Enterprise SP1, Windows 8 Home, Windows 10 , Windows server 2008 and 2012 R2, Windows 10 Long-Term Servicing Channel (LTSC) versions 2015 - 2019

Step 1. Supposed that you have a Windows installation disc in hand, connect it to your computer and set installation disc as the primary boot order in the BIOS. (usually F10 or F12 or Del). If needed you can create Windows 10 installation media using Microsoft's Media Creation Tool, YUMI and WonderISO.

Step 2. One the computer boots from installation disc successfully, you will see the Windows installation wizard interface, don't click Next. Instead, press the Shift+f10 to open the command prompt.

Windows installation wizard interface

Step 3. In the command prompt Window, open the Registry Editor by type regedit command, then press Enter. The Registry Editor window will open.

Registry Editor

Step 4. Click on HKEY_LOCAL_MACHINE to highlight it.


Step 5. Now we will try to modify the Registry, in the left side, click the HKEY_LOCAL_MACHINE option and select File -> Load Hive option. Hive file in Registry can be thought of as a registry tree, this step we will analyze the organization of Hive files.

Step 6. In the pop up window, browse to C:\Windows\System32\config and choose the file called SYSTEM, which stores most computer's configuration files.


Step 7. There is a Key Name popping up in the Load Hive dialogue, just type the temp and click OK to continue.

type temp

Step 8. Once the Hive file is loaded successfully in the Registry Editor, expand the HKEY_LOCAL_MACHINE and then expand temp from the left side, then find the Setup key in the list, click it and there are some data listed in the right part.


Step 9. From the right list, locate and right click the SetupType value and select edit option. Then change the value data to 2 then click OK

change the SetupType 

Don't close the Registry Editor, continue to click the CmdLine value to edit it, and re-type the value data "cmd.exe" and click OK.

change the CmdLine

Step 10. After you complete the modification in the SetupType, an upload hive is required to make the changes effective. Also click on temp to highlight it then go to File -> Unload Hive. Then close the Registry Editor and restart your computer.

Step 11. Now, let's start to reset Windows 10 admin password with command prompt, as we've modified the Registry Value, so we can easily reset the admin password with the method 1, it's like you've already logging in Windows 10.

Step 12. Repeat the Step 1 , when the computer boot to the login screen of window 10, a command prompt will be open automatically. Then type the following command to reset the password for the admin or other targeted account. Here you can also add new user, type net user user password /add and press enter.


net user password

Step 13. After you reset the desired account's password, Do not be in a hurry to close. We will need to revert back to default values, otherwise the command prompt will pop up every time you restart your computer. Type regedit and press Enter which will then open Registry Editor.

open Registry Editor

Step 14. Also you will need to highlight HKEY_LOCAL_MACHINE\SYSTEM\Setup and leave the CmdLine value to blank and the SetupType value is set to 0, and save it. Then restart your computer and try to login your Windows 10 with the new password.



If your system was not authorized for the specified account then it will be prompted error operation. To fix this, you need to enable the Administrator account by running net user administrator /active:yes

Reset Windows 10 Password by Replacing Utility Manager + Command Prompt

One of the major benefits of using a command prompt is that you can deal with any system troubles by going through Microsoft's tools without much hassle. This part will  should be the one most helpful to those  who want to reset any forgotten Windows 10 password, but it also requires you to prepare a Windows 10 installation disk or media like the last method. Let's see how this method works.

Step 1. Connect your Windows 10 installation disk to your computer and press F12, F9, F2 or Del key continuously to access the Boot menu, then select boot from USB or DVD based on the type of your installation disk.

Step 2. When you're on the Windows installation screen, press the Shift+F10 key to open the command prompt window.

Windows installation wizard interface

Step 3. Next, as you don't know which partition the Windows was installed on, sometimes it may be the C:drive, but it's not absolute, so, it's better first checking the drive letter by using the Diskpart and list volume command, which will display all drive letters with the volume number as well as the system drive.


In my computer, It's clear that C: drive is the partition where Windows installed on. Then type command exit to leave from disk part.


For you computer, it might be different, if it's not C: drive then you can change the directory again by using the cd command, type this command cd Windows\System32 to access the System32 folder.


Step 4. Now the most important step comes, before you replacing the utilman.exe you will need to backup so that you can restore it later. Type the command below.

copy c:\windows\system32\utilman.exe c:\

…and press Enter. You should see a "1 file(s) copied " confirmation and continue to type the following command.

copy c:\windows\system32\cmd.exe c:\windows\system32\utilman.exe

replace sethc.exe

Step 5. You're done here, now you should see another file copy confirmation message here, it means the backup process is over. Now, reject your installation disk from computer and type the command wpeutil reboot to let windows boot normally.

wpeutil reboot

Step 6. While the Widows boots into sign-in screen, click  Ease of Access icon to open the command prompt, it looks like a clock that is located in the bottom right of the screen.

Ease of Access icon


Step 7. Here there are a number of ways in which you can handle your accounts including reset admin password, add new user and change the password. For example, we can use the simplest command net user to reset your admin password.

net user username newpassword

NOTE: Username should be replaced with the account name that you want to reset its password and the password should be replaced with the new password you want.

net user username newpassword

Here you can also create a new admin account or new user by running the command below.

net user username /add
net localgroup administrators username /add

Enter the following command to change the password of an existing user.

net user myuser newpassword

Enter the following command to create a new user.

net user myuser newpassword /add

After this step, you should reset Windows 10 administrator or user password with the command prompt successfully. Then reboot your computer and sign in your windows 10 with the new password.

Put Everything Back

Don't forget to restore your shortcuts you changed to avoid being used by some people who have ulterior motives. Boot your Windows 10 again into the Windows installation media you created earlier, and open the command prompt window you did before. Type the following command and press Enter.

copy c:\utilman.exe c:\windows\system32\utilman.exe

Reboot your computer. Profit!


1) The process is complex and difficultas as it has no graphical interfaces.

2) You have to prepare a Windows 10 installation disc.

3) Beginners don't try, it's a lot of risks.

WinPassGo (98% success rate)

If you don't want to run the risk of using command prompt to reset windows admin password, using third-party software can yet be regarded as sensible choice. WinPassGo has developed into the password manager tool which is widest downloaded and used in the world. The user friendly interface  guides you through 3 steps then reset Windows 10 password without command prompt.

It's compatible with both UEFI and MBR BIOS as well as the all edition of Windows and server. In our test, the success rate is 98% and retain all files with no data loss. 


1) Another working computer (Windows or Mac)

2) an USB flash drive with at least 4 GB, or a blank DVD/CD.

3) WinPassGo installation file, download below.

Free Download

Let's see how to use WinPassGo tool to remove or reset Windows 10 admin password without command prompt.

Step 1. Supposed that you have another accessible computer, things will become more easy! Download and install WinPassGo on this computer and run it.

Create A Password Reset Disk

Step 2. Both USB and DVD/CD media are supped by WinPassGo, but I prefer to recommend using USB drive to create a password reset disk. Connect your USB drive to your computer and click BURN button.

created successfully

After you created a password reset disk, then you need to re-connect it to your locked computer and also need to make your PC boot from USB drive. To do this, you can change the boot order from your computer's BIOS setup utility, when windows booting, press the key: F2, F12, or Del to enter the startup menu, then choose to boot Windows from USB. Save the settings!

Boot Your Locked PC from USB Drive


If your computer has UEFI/EFI boot and failed to boot from USB drive, then you may need to make some configuration before booting from a USB drive. You need to disable the secure boot option. 

Step 4. Once your computer is loaded up from a USB drive successfully, WinPassGo will be displayed with all registered accounts in your Windows 10. At the bottom of the program screen, there are 4 options for your choose to manipulate your account and password. They're Reset, Remove, Create Account and Delete Account.

show Windows password

Step 5. If you choose to reset a new password for an account, just select this account and click Reset Password option. A window pops requiring you to enter a new password. You can also remove the password or create a new account, it's so easy!

Reset Windows Password

After that, click "Reboot" button to restart your computer and take effect, now you can be able to sign in your Windows with the new password.

Free Download

How to Choose?

Although resetting windows 10 password with command prompt was always considered as the most effective way to help users unlock a locked computer, however, not everyone has the option of using command prompt, it could be a big challenge for normal users who had never known or used the command prompt, don't take risks. Otherwise, you will have to restore the factory Settings if the operation goes wrong.

So how can I choose?

For advanced users: You can gamely try to command prompt to reset Windows 10 password if you're unable to sign in Windows 10.

For computer novice: WinPassGo or other Windows Password Recovery tools should be your first option.