---
title: "Ignite Reset Windows 10 Password via the Command Prompt"
description: "Learn how to reset Windows 10 Password via the Command Prompt for both logged in users or if you can't login at all."
canonical: "https://adamtheautomator.com/reset-windows-10-password-via-the-command-prompt/"
---

# Ignite Reset Windows 10 Password via the Command Prompt

> Learn how to reset Windows 10 Password via the Command Prompt for both logged in users or if you can't login at all.

Source: https://adamtheautomator.com/reset-windows-10-password-via-the-command-prompt/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Ignite Reset Windows 10 Password via the Command Prompt](https://adamtheautomator.com/wp-content/uploads/2021/02/How-to-Reset-a-Windows-10-Password-with-a-Command-Prompt.jpg)

# Ignite Reset Windows 10 Password via the Command Prompt

[![](https://secure.gravatar.com/avatar/87bec6692789c9e784a6c804c8730a8abc91f68609fc222eeb1068fb8d51acf8?s=192&d=mm&r=g)Jeff Christman](https://adamtheautomator.com/author/jeff/)8 February 20215 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Windows Client](/tag/windows-client/)

Table of Contents

*   [Prerequisites](#h-prerequisites)
*   [Reset Windows 10 Password While Logged In](#h-resetting-a-windows-10-password-while-logged-in)
*   [Verifying Reset Privileges](#h-verifying-reset-privileges)
*   [Reset Windows 10 Password via the Command Prompt](#h-resetting-a-user-password-via-cmd)
*   [Resetting a User Password via PowerShell](#h-resetting-a-user-password-via-powershell)
*   [Resetting a Locked Out Windows 10 Password (Safe Mode)](#h-resetting-a-locked-out-windows-10-password-safe-mode)
*   [Getting into Safe Mode](#h-getting-into-safe-mode)
*   [Resetting a Locked Out Windows 10 Password (Recovery Media)](#h-resetting-a-locked-out-windows-10-password-recovery-media)

Have you ever gotten locked out of your Windows 10 computer or had to figure out how to change a user password like the administrator password? Windows 10 offers several approaches to reset Windows user passwords if you know the current password or not. One of the easiest methods is to reset Windows 10 password via the command prompt.

In this article, you will learn many different ways to reset Windows 10 passwords via the command prompt and you’ll even see how to get back into a locked out Windows computer.

> Remove Exchange on-premises without compromising ease of management. [Use EasyEntra](https://easyentra.com/easyentra-ad-manager-freemium-edition/?utm_source=adam&utm_medium=paid&utm_campaign=easyentra&utm_content=freemiumarticle) instead of AD Users & Computers – Completely Free!

Not a reader? Watch this related video tutorial!

**_Not seeing the video? Make sure your ad blocker is disabled._**

**_Related: [How to Rotate Windows Admin Passwords with Microsoft LAPS](https://adamtheautomator.com/microsoft-laps/#What_is_Microsoft_LAPS)_**

## Prerequisites

This tutorial is going to get hands-on and go over the steps to reset Windows 10 password via the command prompt. Other than a Windows 10 computer, you will also need the Windows 10 recovery media if you can’t log in to the PC. You can find information [_here on how to set up recovery media_](https://support.microsoft.com/en-us/windows/create-a-recovery-drive-abb4691b-5324-6d4a-8766-73fab304c246).

This tutorial will use Windows 10 Build 1909 for all examples and will be working on a computer that is _not_ in an Active Directory domain.

## Reset Windows 10 Password While Logged In

If you need to reset a password, chances are you’ll be in one of two states; logged-in and locked out. Let’s first cover how you can reset a password while logged into Windows with an administrative user account.

### Verifying Reset Privileges

To reset a password while logged into Windows 10, you must have permission to do so. Although you could [_apply granular permission to reset a password_](https://social.technet.microsoft.com/forums/windowsserver/en-US/2d34b37b-152b-446d-917e-340981d7d0f7/give-windows-local-groupusers-user-permission-to-change-others-same-group-users-password), this tutorial will take the easy route and require a user to be in the _Administrators_ group.

To confirm the account you’re logged in with is a member of the _Administrators_ group:

1.  Click on the Start menu and type _cmd,_ to open the command prompt window.

> _Be sure to right-click on cmd and run the command prompt as administrator so you have the rights to make changes._

2\. With the Command Prompt window open, type `whoami` to get the logged on user. The string before the `\` is the name of the computer.

![The user adambertram is logged in.](https://adamtheautomator.com/wp-content/uploads/2021/02/Untitled-2021-02-03T145006.974.png)

The user adambertram is logged in.

3\. Now type `net user` followed by your logged-in user account.

```powershell
net user adambertram
```

> _The [net user command](https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771865\(v=ws.11\)) is a handy command in nearly all Windows versions that will pull information about local user accounts, disable and enable user accounts and reset passwords._

You’ll see a lot of output but the information you’re looking for is at the bottom as shown below. You can see that the _adambertram_ local account is part of the _Administrators_ group.

![Inspecting the Local Group Memberships of the logged-in user account](https://adamtheautomator.com/wp-content/uploads/2021/02/Untitled-2021-02-03T145143.134.png)

Inspecting the Local Group Memberships of the logged-in user account

### Reset Windows 10 Password via the Command Prompt

Once you’ve confirmed your logged-in account has permission to reset the password, you can now reset the password. To do that:

With the Command Prompt still open, type `net user` followed by the user account and the new password. The command below is changing the local _adambertram_ user account’s password to _P@ssw0rd1_.

```powershell
net user adambertram P@ssw0rd1
```

Once complete, you can now login with the _adambertram_ account with the new password!

### Resetting a User Password via PowerShell

The more “modern” way to reset a Windows 10 user password is to use PowerShell. PowerShell is a shell that’s available in all Windows operating system starting in Windows 7.

To reset a user password via PowerShell:

1.  Click on the Start menu, type in ‘powershell’ and open Windows PowerShell as administrator.

**_Related: [How to Run PowerShell as Administrator](https://adamtheautomator.com/powershell-run-as-administrator/)_**

With PowerShell open, you’ll now need to define the new password but also [convert it to a secure string](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/convertto-securestring). A secure string is one way PowerShell ensures passwords aren’t stored in plain text. This step is enclosed in parentheses below.

The [`Set-LocalUser`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/set-localuser) cmdlet is the command that actually changes the password.

```powershell
Set-LocalUser -Name adambertram -Password (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force)
```

## Resetting a Locked Out Windows 10 Password (Safe Mode)

Changing a password, as you’ve seen above, is a breeze if you can’t actually log into the computer. But what if you’re completely locked out and can’t log in at all? In that case, you’re not completely out of luck but you’ve got some extra work to do!

To reset a user password while not logged in, you’ve got two options; using [_Windows 10 safe mode_](https://support.microsoft.com/en-us/windows/start-your-pc-in-safe-mode-in-windows-10-92c27cff-db89-8644-1ce4-b3e5e56fe234) and [_recovery media_](https://support.microsoft.com/en-us/windows/create-a-recovery-drive-abb4691b-5324-6d4a-8766-73fab304c246). Let’s cover each one now starting with safe mode.

> [_Safe Mode_](https://support.microsoft.com/en-us/windows/start-your-pc-in-safe-mode-in-windows-10-92c27cff-db89-8644-1ce4-b3e5e56fe234) is a Windows 10 troubleshooting tool that restarts the PC in a basic state using a limited set of files and drivers.

You can use safe mode to access the command prompt without loading the full operating system bypassing the login screen.

#### Getting into Safe Mode

First up, you need to get into safe mode. To do that:

1.  Log out of Windows 10.

From the main login screen, press and hold the **Shift** key while clicking **Restart** as shown below. Once restarted, Windows 10 will be at a spot to tell it you need to boot into safe mode.

![Restarting Windows 10 in safe mode](https://adamtheautomator.com/wp-content/uploads/2021/02/Login.png)

Restarting Windows 10 in safe mode

3\. From the **Advanced Boot Options** screen, click on **Troubleshoot**. The **Troubleshoot** screen is a place in safe mode where you can fix some bootup and other Windows 10 problems.

4\. While on the **Troubleshoot** screen, select **Advanced Options.**

![Navigating to Advanced Options in safe mode.](https://adamtheautomator.com/wp-content/uploads/2021/02/image_4.png)

Navigating to Advanced Options in safe mode.

5\. The **Advanced Options** screen displays several options to choose from. Click on **Startup Settings**.

![Selecting Startup Settings in the Advanced Options menu.](https://adamtheautomator.com/wp-content/uploads/2021/02/image_5.png)

Selecting Startup Settings in the Advanced Options menu.

6\. On the **Startup Settings** screen, select the **Restart** button. Once restarted, Windows 10 will be in safe mode.

![ Startup Settings options prior to restarting in Safe Mode.](https://adamtheautomator.com/wp-content/uploads/2021/02/image_6.png)

Startup Settings options prior to restarting in Safe Mode.

7\. After restarting, the **Startup Settings** screen will list several options to choose from. Press 4 to restart into safe mode.

![Advanced boot options: Press 6 or F6](https://adamtheautomator.com/wp-content/uploads/2021/02/image_7.png)

Advanced boot options: Press 6 or F6

8\. After restarting again, you should now see a Command Prompt opens with elevated privileges (**Administrator:**) rather than the normal Windows 10 desktop.

![Running the command prompt in safe mode](https://adamtheautomator.com/wp-content/uploads/2021/02/Untitled-2021-02-03T145712.181.png)

Running the command prompt in safe mode

9\. Once you have the Command Prompt open in safe mode, the only thing left to do is use `net user` to reset the password for the user account.

```powershell
net user adambertram P@ssw0rd1
```

## Resetting a Locked Out Windows 10 Password (Recovery Media)

If you cannot reboot into safe mode, you can also use the recovery media to change user account passwords. Doing so requires you to copy _cmd.exe_ to the local drive and change the password using the same methods as above.

Let’s step through how to make it happen.

> _To use this method, you must have already created [recovery media](https://support.microsoft.com/en-us/windows/create-a-recovery-drive-abb4691b-5324-6d4a-8766-73fab304c246) probably on a USB stick or a Windows 10 installation disk._

1.  Insert the recovery media and restart the computer. Once Windows reboots, the Windows setup screen will appear.

![Windows 10 install screen](https://adamtheautomator.com/wp-content/uploads/2021/02/Untitled-2021-02-03T145834.983.png)

Windows 10 install screen

2\. Press Shift + F10 to open a Command Prompt.

![Reset Windows 10 Password via the Command Prompt](https://adamtheautomator.com/wp-content/uploads/2021/02/Untitled-2021-02-03T145912.545.png)

Reset Windows 10 Password via the Command Prompt

3\. In the Command Prompt window run the following two lines. These lines essentially overwrite a file called _utilman.exe_ (Utility Manager) on the Windows 10 sign-in screen located in C:\\Windows\\system32 with _cmd.exe_.

> _Stop struggling with password reset calls and account lockouts in Active Directory. [Get a FREE trial of Specops uReset.](https://specopssoft.com/contact-us/?utm_source=ata&utm_medium=referral&utm_campaign=na_ata&utm_content=mention)_

```powershell
move c:\windows\system32\utilman.exe c:\
 copy x:\windows\system32\cmd.exe c:\windows\system32\utilman.exe
```

4\. Now, remove the installation disk or the recovery media and restart the computer again.

5\. Once the Windows 10 login screen comes up on the Windows 10 sign-in screen tap the **Utility Manager** icon found on the bottom-right corner to open the command prompt as shown below.

> With EasyEntra, first-level support teams can focus on what instead of where! [Manage AD, Entra ID, and Exchange Online](https://easyentra.com/?utm_source=adam&utm_medium=paid&utm_campaign=easyentra&utm_content=standardarticle) from a consolidated, intuitive console.

![Swapping Ease of Use with cmd.exe](https://adamtheautomator.com/wp-content/uploads/2021/02/utilman2.png)

Swapping Ease of Use with cmd.exe

6\. Now that you’re in a command prompt again, simply change the password with `net user` as before.

```powershell
net user adambertram P@ssw0rd1
```

7\. Now restart Windows 10 and login with the user account with the new password!

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Freset-windows-10-password-via-the-command-prompt%2F&text=Ignite%20Reset%20Windows%2010%20Password%20via%20the%20Command%20Prompt)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Freset-windows-10-password-via-the-command-prompt%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Freset-windows-10-password-via-the-command-prompt%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2021/05/Wrangling-NetBIOS-With-the-nbtstat-Utility.jpg)

### [Wrangling NetBIOS With the nbtstat Utility](/nbtstat/)

Do you need to retrieve NetBIOS statistics to help you analyze and troubleshoot name resolution problems? The nbtstat command line tool can you do just that. Learn how to use nbtstat and its many switches in this tutorial.

![](https://adamtheautomator.com/wp-content/uploads/2021/05/How-to-Convert-MBR-to-GPT-and-GPT-to-MBR-Step-by-Step.jpg)

### [How to Convert MBR to GPT and GPT to MBR \[Step-by-Step\]](/convert-mbr-to-gpt/)

Have you purchased a new hard drive but cannot access all of its disk space? Luckily for you, this article will teach you how to convert MBR to GPT.

![](https://adamtheautomator.com/wp-content/uploads/2021/04/How-to-Connect-to-Network-Drives-on-the-Command-Line-with-Net-Use.jpg)

### [How to Connect to Network Drives on the Command Line with Net Use](/net-use/)

If you need to map a network drive or connect to network device over the SMB protocol, the net use command may be for you.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
