Windows 10 is a versatile operating system with many supporting tools, and there are also many additional tools that users have yet to fully explore. With the guide to changing Windows 10 password via PowerShell, we will discover another utility of PowerShell, one of the most useful tools and also an enhanced version with more capabilities than Command Prompt.
Method: Changing Windows 10 Password via PowerShell
Guide to changing Windows 10 password using PowerShell
Step 1: Any Windows 10 system has PowerShell. To open PowerShell, simply open the Start Menu and type PowerShell. However, note that to change the Windows 10 password using PowerShell, you need to open PowerShell with Admin rights >> meaning you have to choose Run as Administrator.
Step 2: Immediately, the PowerShell interface with Admin rights appears. Here, you type the command Get-LocalUser to have the system list all the Users on your Windows 10 computer.
A list of Users appears. Here you see the Enabled column displaying either True or False. If it shows False, it means the account is not activated, while True indicates it is activated and in use.
Step 3: To proceed with changing the Windows 10 password using PowerShell with a new password, now we just need to enter the following command line:
$Password = Read-Host 'Enter the new password' -AsSecureString
Step 4: After hitting Enter, proceed to enter the password you want to set, then hit Enter to end the command.
Step 5: Have you changed the Windows 10 password using PowerShell yet? Of course not because we still have to assign that new password to your Windows 10 account on your computer by entering the command:
Set $UserAccount = Get-LocalUser -Name 'Computer username'
After finishing the command, type $UserAccount | Set-LocalUser -Password $Password, this command allows changing Windows 10 password via PowerShell as we assigned above.
After these steps, simply close PowerShell, restart your computer to see if changing the Windows 10 password via PowerShell has been successful or not.
Here is the guide on how to change Windows 10 password via PowerShell. With the guide to changing Windows 10 password using PowerShell method, another handy feature of PowerShell is added to our knowledge. Indeed, besides changing Windows 10 password, PowerShell can do many different tasks. For those who are passionate about exploring computers, surely they cannot ignore such a handy trick like this.
For those passionate about computers, eager to delve deeper into PowerShell, exploring its commands, they can refer to our article introducing useful PowerShell commands on computers running Windows 10.