How to Reset Windows 10 Password via Command Prompt

You can learn how to reset Windows 10 password from Command Prompt with a detailed guide and how to use a handy tool to easily reset Windows 10 password without login.

Posted by @Lucas December 17, 2024 Updated By @Lucas May 12, 2023

We all know Command Prompt is a practical built-in tool on Windows computers. With typing correct command lines, users can resize drives, format drives, change partition schemes, etc, and if you’re quite familiar with various orders, you can go further to modify your computer and fix errors via this tool.

Using command lines to reset Windows 10 password is what you can achieve when you have password problem on your computer. No matter whether you’re in the system or unable to enter the system, Command Prompt can help you reset Windows 10 password.

2 ways to reset windows 10 password via Command Prompt

In this post, we’ll show you how to reset Windows 10 password via Command Prompt with detailed command lines. Follow the steps carefully, you can successfully reset password from Command Prompt.

One thing you need to know at first: Command Prompt is a built-in tool on your PC, so it only works for local account password. If you’re using a Microsoft account to log into your system, it won’t work.

1. Reset Windows 10 password via Command Prompt after login

When you have administrator access to Windows 10, you may quickly run the Command Prompt and reset the Windows 10 local admin password.

Step 1. Click on the Start menu and type cmd, right-click on cmd, and run the Command Prompt as administrator.

Step 2. Enter command in Command Prompt window to reset local admin password:

• net user (eg. net user admin 123456).

Or you create new admin account with command below:

• net user /add • net localgroup administrators /add

2. Reset Windows 10 password in Command Prompt without login

If you are already unable to log into your Windows 10, then, you have 2 ways to enter CMD to reset password.

▶ Option 1. Use Windows 10 installation media to enter Command Prompt

If you have a Windows 10 installation media, you can use it to get into CMD.

Step 1. Connect Windows 10 installation media to your computer and boot from this installation disk.

Step 2. When you see this screen, press the Shift + F10 key.

▶Option 2. Access advanced options to enter Command Prompt

Step 1. Restart your computer. Click the Start button, click the arrow next to the Shut Down button (or the arrow next to the Lock button), and then click Restart.

Step 2. Press and hold the F8 key as your computer restarts. You need to press F8 before the Windows logo appears. If the Windows logo appears, you'll need to try again by waiting until the Windows logon prompt appears, and then shutting down and restarting your computer.

Step 3. On the Advanced Boot Options screen, choose Command Prompt.

Now, we can use CMD to reset password.

Step 1. Please type the following lines and press enter after each:

c: (Type the letter of your system drive, if it’s D drive, you need to type d:) • cd windows\system32ren sethc.exe sethc01.exe (rename sethc.exe to sethc01.exe) • copy cmd.exe sethc.exe (copy cmd.exe to sethc.exe)

Step 2. After that, we can input "wpeutil reboot" to fast restart your Windows 10 computer.

Step 3. When you see the user password input interface again, constantly press the "Shift" key to call out the CMD window.

Step 4. Now, type "net user username password" and press "Enter" to reset the local account password in Windows 10. eg. net user admin 123456

Easily reset Windows 10 password via a handy tool on Windows PC

You see, once you forget Windows password or are unable to enter Windows 10 with the current password, using CMD will be quite complicated. So, if you failed to reset Windows 10 password in Command Prompt or think Windows 10 password reset via orders is too complicated for you, try AOMEI Partition Assistant Professional, a powerful Windows password reset tool to log into your locked Windows 10 computer easily.

You just need to prepare an empty USB and find a working Windows computer, this tool can create a password reset USB for you. All Windows 11/10/8/8.1/7/XP/Vista are supported.

Free DownloadWin 11/10/8.1/8/7/XP
Secure Download

Step 1. Connect a prepared USB to any running computer. Install and launch AOMEI Partition Assistant. Click “Tools” in the top toolbar and select  “Reset Windows Password”.

Step 2. In the pop-up window, you'll be noted to create a WinPE bootable media. Click "Next" to move on.

Step 3. Here we tick "USB Boot Device", choose your prepared USB for bootable USB creation, and click "Proceed".

Step 4. Note that the USB flash drive needs to be formatted and all data on it will be wiped. Please back up anything important on it and redo.

The progress will take a few minutes. When the bootable USB is created successfully, unplug the USB and connect it to your laptop.

Step 1. Boot the computer from this bootable USB, and you will see AOMEI Partition Assistant on the screen. Click "Reset Password", select the Windows system you would like to operate, and click "Next".

Step 2. Then, select the account you would like to operate, choose a feature: "Remove Account Password" or "Reset Account Password", and click "Next".

Step 3. Next, a pop-out window lets you set a new password. After you confirm the new password, please click "Yes" to start the password reset.

Ending lines

Aside from the Command Prompt with complex commands, AOMEI Partition Assistant Professional can reset Windows 10 password on a locked PC.

As a multifunctional tool, users can easily manage their PCs through other useful functions, such as disk cloning, MBR/GPT data-safe conversion, app mover, resizing partition, testing disk speed, etc. And you can choose the Server Edition if you’re using a Windows Server system.