This post shows students and new users steps to change a user password using the Command Prompt or Windows Terminal with PowerShell in Windows 11. Windows allows users to change or reset their passwords from the Windows Settings app or Control Panel.
There are other ways one can change their account password in Windows. If you have a local account, you can use PowerShell or Windows commands to reset your account password from Command Prompt or Windows Terminal as well.
A good reason to reset or change a local account password in Windows 11 is if the account has been compromised or password is no longer a secret. You’ll need to change it so that it’s secured again.
For new users, using the Windows Settings app is the easiest way to reset one’s account password. However, If Windows Command Prompt or PowerShell is your thing, you can use those tools to change or reset your password as well.
Below is how to do that in Windows 11
How to change your password from the command prompt in Windows 11
For advanced users or those who want to try other ways to reset their password, the Command Prompt or Windows Terminal can also be used..
Under Best match, select and open Windows Terminal.
Once Windows Terminal opens, select a new tab with Command Prompt. By default, Windows Terminal opens with PowerShell tab.
Run the commands below to list all available users on the computer.
You will see a similar screen as the one below:
The list of users will be longer depending on how many users are active on the computer.
Now to change your password, simply run the commands format below, replacing USERNAME with your own account name.
net user USERNAME *
When you run the commands above, you should see similar screen as the one below if it was successful.
If you get a system error, then you will need to open Widows Terminal as administrator.
How to change password with PowerShell commands in Windows 11
Above we showed you how one can change their password in Windows using Windows commands via Window Terminal.
Another way one can change or reset their password using commands is via PowerShell. You can use Windows Terminal to run PowerShell commands using the PowerShell console tab.
Open Windows Terminal, by default the PowerShell tab is selected. Then run the commands below to list available users on the system.
You should get similar screen as the one below.
To change your password using PowerShell, you’ll need to store the password in a variable, then use the variable to change your password.
Run the commands below to create a new password and store it in a variable called $Password.
$Password = Read-Host "Enter the new password" -AsSecureString
With the variable stored, run the commands below to change your password with the stored password in the $Password variable.
Note: Replace USERNAME with your own account name.
$UserAccount = Get-LocalUser -Name "USERNAME" $UserAccount | Set-LocalUser -Password $Password
You can log off and try the new password.
For those who have Microsoft account can use the link below to reset their password.
That should do it!
This post showed you how to change or reset your account using a command in Windows 11. If you find any error above or have something to add, please use the comment form below.