There are multiple ways to change your account password. Here we will learn some of the coolest commands to change the account password. Now, speaking of commands, here we are not performing those codes on Command prompts, we are doing on PowerShell – Don’t freak out! there are a lot of similarities between them.

But before we begin here is a nice little tip. You should always be careful regarding the password. To avoid being in trouble, you should change your password frequently. It reduces the chances of getting hacked.

Change account password using PowerShell

  1. Click on the Windows logo on the taskbar 
  2. Type PowerShell, right-click on it and select Run as administrator.
  3. Type the following command and press Enter:


  4. Type the following command to create and store the new password and then press Enter:

    $Password = Read-Host “Enter the new password” -AsSecureString

  5. Now type your password.
  6. Type the following command and press Enter on each line. This is to make sure that the new password is also set to the local account:

$UserAccount = Get-LocalUser -Name “admin”
$UserAccount | Set-LocalUser -Password $Password

Note: Make sure to replace “admin” with the name of the account that you want to reset its password. For example, if my account name is QWERTY then I will replace “admin” with QWERTY.