How to Change Windows 11 Password via Command Prompt
This guide shows you how to change your account password in Windows 11 using the Command Prompt or PowerShell. You can learn more by visiting the Windows Windows allows users to change or reset passwords from the Windows Settings app or Control Panel.
Why change your password?
You might need to change your password if you think your account is no longer secure or if someone else has learned your current password. Changing it helps keep your personal files safe.
What happens when you are done?
Once you finish these steps, your old password will stop working immediately. You will need to use your new password the next time you sign in to your computer.
If you have a local account, you can also reset your password using these tools or by visiting Windows Terminal. For more options, you can use the Windows Settings app or the Control Panel. If you need more help, check out Windows Terminal.
Changing your password via Command Prompt
To start, go to the Start menu and search for Windows Terminal. Under the results, select and open Windows Terminal.

Note: You must select a new tab with Command Prompt to run these commands. If you get a system error, make sure you open Widows Terminal as administrator with administrative rights.
Once the window is open, type the following command to see a list of users on your computer:
net user
To change your password, type the following command, but replace USERNAME with your actual account name:
net user USERNAME *
Changing your password via PowerShell
You can also use PowerShell inside the same terminal window. First, see a list of your local users by typing this command:
Get-LocalUser
To set a new password, you first need to create a secure password variable. Type this command and press Enter:
$Password = Read-Host "Enter the new password" -AsSecureStringAfter typing your new password, use these commands to apply it to your account. Remember to replace USERNAME with your account name:
$UserAccount = Get-LocalUser -Name "USERNAME"
$UserAccount | Set-LocalUser -Password $PasswordIf you have a Microsoft account, you can use How to reset your Microsoft account password to reset your password through Microsoft’s official site.
Summary
Changing your password through the Command Prompt or PowerShell is a quick way to manage your security without using the standard Settings app. Always remember to use a strong, unique password to protect your account. If you ever forget a Microsoft account password, you can use the official online reset tools instead.
Was this guide helpful?
Leave a Reply Cancel reply