Instructions to change Windows 10 password using PowerShell

Windows 10 is a multi-featured operating system with many supporting tools, including PowerShell. Instructions for changing Windows 10 password using PowerShell will help you discover another useful feature of this tool. 

Instructions to change Windows 10 password using PowerShell

Step 1:  Click Start and type PowerShell => Right-click and select Run as Administrator .

Instructions to change Windows 10 password using PowerShell Picture 1

Step 2:  PowerShell (Admin) will open immediately. Enter the command Get-LocalUser to list all users on the machine.

Instructions to change Windows 10 password using PowerShell Picture 2

The user list appears. The Enabled column displays True (enabled) or False (not enabled).

Instructions to change Windows 10 password using PowerShell Picture 3

Step 3:  To change the password enter the following command:

$Password = Read-Host "Enter the new password" -AsSecureString

Instructions to change Windows 10 password using PowerShell Picture 4

Step 4:  Press Enter , enter the new password, then press Enter again to complete.

Instructions to change Windows 10 password using PowerShell Picture 5

Step 5: You need to assign a new password to your Windows 10 account using the following command:

$UserAccount = Get-LocalUser -Name "Computer user name"

Instructions to change Windows 10 password using PowerShell Picture 6

After the above command, type $UserAccount | Set-LocalUser -Password $Password to change the assigned password.


Instructions to change Windows 10 password using PowerShell Picture 7

Once done, close PowerShell and restart your computer to check if the Windows 10 password change was successful.

Here is how to change Windows 10 password using PowerShell. PowerShell not only changes passwords but also has many other useful features. Those who are passionate about exploring computers will not ignore this trick.

If you want to learn more about cool PowerShell commands, check out this article for more details.

4 ★ | 1 Vote

May be interested

  • How to enable, disable REFS format on Windows 10Photo of How to enable, disable REFS format on Windows 10
    whether to enable or disable refs formatting in windows 10 is still a controversial issue. is refs really necessary for you? if not, you can consider disabling this feature to improve system performance.
  • How to Restore TrustedInstaller Permissions on Windows 10Photo of How to Restore TrustedInstaller Permissions on Windows 10
    to customize windows 10 to your liking, you need to remove the rights of trustedinstaller. however, if something goes wrong and you want to restore the default owner rights, you can restore to the default owner. let's find out how to do it in the article below!
  • How to display computer date and time on Windows 10 screenPhoto of How to display computer date and time on Windows 10 screen
    many people regret that windows 10 removed the gadget system, making the date and time display no longer the same as before. instead, you can use action center or utilities developed by programmers to fix this problem.
  • How to Erase Windows 10 Drive with DiskPartPhoto of How to Erase Windows 10 Drive with DiskPart
    diskpart is a powerful command-line tool that helps users manage hard drives and partitions on their computers. if you want to erase a drive in windows 10, this tool will help you do it quickly and efficiently.
  • Users begin to flee Windows 10Photo of Users begin to flee Windows 10
    it seems that more and more users are ready to give up on windows 10 as the october 14 end of support date approaches.
  • How to restart Windows Explorer when it hangs without losing dataPhoto of How to restart Windows Explorer when it hangs without losing data
    windows explorer error causing taskbar and file explorer to become unresponsive? if you encounter this situation, you can restart without shutting down your computer. here are detailed instructions on how to fix it quickly.