How to Change Windows 11 Password via Command Prompt
Keeping your computer secure starts with a strong password. This guide explains how to change your Windows 11 password using the Settings app, Command Prompt, and online tools.
Why change your password?
You should change your password if you suspect someone else knows it or if you want to improve your account security. Regularly updating your credentials helps protect your personal files and data from unauthorized access.
What happens when you are done?
Once you update your password, the old one will stop working immediately. You must use the new password to sign in to your computer and access your Microsoft services. If you use a PIN, you may need to update that as well.
Changing Your Password via Windows Settings
The easiest way to change your password is through the Windows Settings app. This works for both Microsoft accounts and local accounts.
- Open the Start menu and click the Settings gear icon.
- Select Accounts from the left sidebar.
- Click on Sign-in options.
- Choose Password and click the Change button.
- Follow the on-screen prompts to verify your identity and set a new password.

Microsoft Account vs. Local Account
It is important to know which account type you use. A Microsoft account is linked to your email and syncs across devices. A local account exists only on your specific computer. If you use a Microsoft account, you must change your password through the official Microsoft online portal.
Changing Password via Command Prompt (Admin Required)
Advanced users can use the Command Prompt to change passwords quickly. Note: This requires Administrator privileges.
1. Search for Command Prompt in the Start menu, right-click it, and select Run as administrator.
2. Type the following command to see your user list:
net user
3. To change the password for a specific user, type this command and press Enter:
net user USERNAME *
Changing Password via PowerShell (Admin Required)
PowerShell offers another way to manage local users. Note: This requires Administrator privileges.
1. Open PowerShell as an administrator.
2. View your local users with this command:
Get-LocalUser
3. Create a secure password variable and apply it to your account:
$Password = Read-Host "Enter the new password" -AsSecureString4. Use these commands to finalize the change:
$UserAccount = Get-LocalUser -Name "USERNAME"
$UserAccount | Set-LocalUser -Password $PasswordSummary
You can change your Windows 11 password using the Settings app for a simple experience or use Command Prompt and PowerShell for faster, administrative control. Always ensure you use a unique, complex password to keep your system secure. If you use a Microsoft account, remember that your password is managed through your online Microsoft account profile.
Can I change my Windows 11 password without knowing the old one?
If you have forgotten your password, you cannot simply change it. You must use the ‘I forgot my password’ link on the sign-in screen to reset it. For Microsoft accounts, you will need to verify your identity via email or phone. Local accounts require answering security questions set during account creation.
Is it safer to use a PIN or a password in Windows 11?
A PIN is generally considered safer for daily use because it is tied to your specific device and stored in a secure chip called the TPM. Unlike a password, which can be stolen and used on any computer, your PIN only works on your physical machine, making it more resistant to remote attacks.
Was this guide helpful?
Leave a Reply