How to change an account password using PowerShell on Windows 10

In Windows 10, you can change your regular account password using Control Panel, Command Prompt, and PowerShell.

If you must change or reset your account password because it’s been hacked, or it’s too easy to guess, and you want to set a more complex password, you can use a few simple PowerShell commands.
change password

In this guide, you will learn the steps to change the existing password of your local Windows 10 account using PowerShell.
Change account password from PowerShell on Windows 10

To change the local account password from PowerShell, use the following steps:

Open Start on Windows 10.
Search for PowerShell, right-click the top result, and select the Run as administrator option.
Type the following command Get-LocalUser to list all available accounts and hit Enter:

Type the following command to generate and store the new password inside a variable and hit Enter
$Password = Read-Host “Enter the new password” -AsSecureString
Type the new password for the account and press Enter.
Type the following command and press Enter on each line to apply the new password to the local account:
$ UserAccount = Get-LocalUser -Name “admin” $ UserAccount | Set-LocalUser-Password $Password

In the second command, be sure to replace “admin” with the name of the account whose password you want to reset.

Once you complete the steps, sign out and then sign back into your Windows 10 account using the new password.
The above instructions apply to a standard account.

You must follow other steps to change or reset your password if you have a Microsoft account
While this guide focuses on Windows 10, the above steps should also work on Windows 8.1 and 7.

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button