Reset the local account password using PowerShell in Windows 10
If you want to change a complex password due to a password leak, too easy to guess, or other reasons, in Windows 10, you can use the Control Panel, Command Prompt or even PowerShell to change/reset the local account password.
This post will show you how to change the local account password through PowerShell.
- Press Windows + X and select Windows PowerShell (Admin)
-
Execute the following command to list all local accounts
Get-LocalUser -
Execute the following command to create a new variable to store the password
$Password = Read-Host “Enter the new password” -AsSecureString
- Execute the following command to use the new password for the specified local account:
$UserAccount = Get-LocalUser -Name “dvsci”
$UserAccount | Set-LocalUser -Password $Password -
After completing these steps, you may be possible to log in to your Windows 10 system with a new reset password after you log out.