Computer >> Computer tutorials >  >> System >> windows

How to reset or change Local Account password using Command Prompt or PowerShell in Windows 10

If you need to reset the password on your Windows 10 device, you’ll be in one of two states; logged-in or locked out. In a previous article, we have explored how to reset local account password using installation media, if you’re locked out. In this post, we will now look at how you can reset your local account password while logged into Windows 10 with an administrative user account, using Command Prompt or PowerShell.

How to reset or change Local Account password using Command Prompt or PowerShell in Windows 10

To reset a password while logged into Windows 10, you must have administrative permission and required to be a user in the Administrators group.

To confirm the account you’re logged in with is a member of the Administrators group, do the following:

  • Press Windows key + R to invoke the Run dialog.
  • In the Run dialog box, type cmd and then press CTRL + SHIFT + ENTER to open Command Prompt in admin mode.
  • In the command prompt window, type whoami and hit Enter to get the logged-on user.
  • Now, type net user followed by your logged-in user account.
net user obinna

From the output, you can see on the lead-in image above, that the obinna local account is part of the Administrators group. Now you can proceed to reset the password for the logged-in account.

Change Local Account password via Command Prompt

To reset local account password via Command Prompt in Windows 10, do the following:

  • Open CMD prompt in elevated mode.
  • In the window, type the command below and hit Enter. Substitute the <PASSWORD> placeholder with the actual password you want.
net user obinna <PASSWORD>

Once the command executes, you can now login to your Windows 10 device with the local account with the new password!

Reset Local Account password via PowerShell

To reset local account password via PowerShell on Windows 10, do the following:

  • Press Windows key + X to open the Power User Menu.
  • Tap A on the keyboard to launch PowerShell in admin mode.
  • In the PowerShell console, type in the command below and hit Enter. Substitute the <PASSWORD> placeholder with the actual password you want.
Set-LocaUser -Name obinna -Password (ConvertTo-SecureString "<PASSWORD>" -AsPlainText -Force)

Once the command executes, you can now login to your Windows 10 device with the local account with the new password!

That’s it!

How to reset or change Local Account password using Command Prompt or PowerShell in Windows 10