How to Change Windows 11 Password via Command Prompt
- 12 steps
- Needs administrator rights
Changing your Windows 11 password via Command Prompt takes under 60 seconds and lets you bypass the Settings app entirely. Command Prompt is a built-in Windows tool that lets you run system tasks by typing short text commands.
You use the built-in net user command to set a brand new password instantly. It works on Windows 11 Home and Pro alike. It is a quick way back in when you are locked out of one account, as long as you can still sign in to another account with administrator rights. It cannot reset a password for you if no administrator account is available. The Settings app method and the PowerShell method are covered below as well.
Open Command Prompt as administrator, then type “net user USERNAME *” and press Enter. Replace USERNAME with your actual account name. You will be prompted to enter and confirm your new password.
Changing Your Password via Windows Settings
Changing your Windows 11 password through the main Settings app takes just a few clicks if you know where to look. You can use this method for both standard local profiles and connected Microsoft accounts. The path is Settings Accounts Sign-in options, and the steps below walk through it. You need to be signed in to the account whose password you want to change.
- Open the Start menu and click the Settings gear icon. The Settings window opens.
- Select Accounts from the left sidebar. The account options appear on the right.
- Click on Sign-in options. You see a list of ways to sign in, such as a PIN, a security key and a password.
- Choose Password and click the Change button. If you don’t see the Password entry, expand the list or check that your account actually has a password set.
- Follow the on-screen prompts to verify your identity and set a new password. You will be asked for your current password first. Windows then asks you to type the new one twice, and a hint as well if you use a local account. Use the new password the next time you sign in or unlock the PC.

Microsoft Account vs. Local Account
The correct reset steps depend on whether you use a Microsoft account or a local account. Microsoft accounts tie directly to cloud profiles, requiring updates through the official online portal. Local accounts exist exclusively on the physical machine.
To check which one you have, go to Settings Accounts Your info. A Microsoft account shows an email address under your name. A local account shows the words Local account instead.
This matters for the command line. The commands in this guide are meant for local accounts. If you run them against a Microsoft account, you only change the password stored on this PC, and it no longer matches your online password. That mismatch leads to confusing sign-in problems, so change a Microsoft account password online instead.
Changing Password via Command Prompt (Admin Required)
You can change your Windows 11 password using Command Prompt if you have administrator access to the computer. This method lets you bypass the standard login screens and reset user credentials directly through the command line. You must run the terminal with full administrator rights for the command to work properly. Without them, Windows returns an “Access is denied” error.
- Search for Command Prompt in the Start menu, right-click the result, and select Run as administrator. If a User Account Control prompt appears, click Yes. A black window opens, and its title bar should read “Administrator: Command Prompt”.
- View your existing user accounts by typing net user and pressing Enter. Windows prints a list of every account on the PC. Find the account you want to change and note its name exactly as written. The list also contains built-in accounts such as Administrator and Guest, which you can ignore.
net user
- Update the credentials using the net user USERNAME * command. Replace USERNAME with the account name from the list. If the name contains a space, put it in quotation marks. Press Enter. Windows asks you to type the new password and then to retype it to confirm. Nothing appears on screen as you type, not even dots. That is normal, so just type the password and press Enter.
net user USERNAME *
When the change works, Windows prints “The command completed successfully.” No restart is needed. Lock the PC with the Win plus L and sign in with the new password to confirm it. If you get “The passwords do not match”, run the command again and retype carefully.
Be careful when you reset the password of a different account than the one you are signed in to. Windows can no longer open files encrypted with that account’s old password, and it may lose saved passwords such as those in Credential Manager. Do this only when you have no other choice. Also avoid pressing Enter at the prompt without typing anything, because that sets a blank password.
Changing Password via PowerShell (Admin Required)
PowerShell provides another command-line way to change a Windows 11 password when you need administrative control over local user accounts. This tool works well for IT tasks or when the standard desktop settings are blocked. You need to open PowerShell as an administrator and use a secure string variable to apply the new password safely. The variable keeps the password from being stored as plain text in the command itself.
- Open PowerShell as an administrator. Search for it in the Start menu, right-click the result and select Run as administrator. The window title should read “Administrator: Windows PowerShell”.
- View your local users with this command. It lists the local accounts on the PC, so note the exact name of the one you want to change.
Get-LocalUser
- Create a secure password variable and apply it to your account. Type the commands exactly as shown, but replace the example account name with the one you noted in step 2. When PowerShell asks for the new password, type it. As with Command Prompt, the characters stay hidden while you type.
$Password = Read-Host "Enter the new password" -AsSecureString- Use these commands to finalize the change. If PowerShell returns to a new prompt with no message, the change usually went through. Red error text means it failed, most often because of a mistyped account name or a window that is not running as administrator.
$UserAccount = Get-LocalUser -Name "USERNAME"
$UserAccount | Set-LocalUser -Password $PasswordSummary
Standard desktop users rely on the Settings app, while system administrators prefer the speed of Command Prompt and PowerShell. Use Settings when you know your current password and want a safe, guided change. Use Command Prompt or PowerShell when you have administrator rights and need a quick reset, or when you manage several local accounts. To undo a change, just run the same command again and set the password you want.
Frequently asked questions
How to reset 🪟 Windows 11 password without Command Prompt?
Open the Windows Settings app, go to Accounts, then Sign-in options, and choose Password. Enter your current password, then type and confirm a new one. This works only while you are signed in to the account. If you are locked out, sign in to another administrator account and change it there, or use the Microsoft account password reset page.
How to change administrator password with Command Prompt?
Open Command Prompt as administrator, then type net user administrator * and press Enter. Windows asks for the new password twice. Your typing stays hidden. This only works if you are already signed in with administrator rights. The built-in Administrator account is disabled by default, so you may need to enable it first.
I forgot my Hotmail password. How can I reset it?
Go to account.microsoft.com/password/reset, enter your Hotmail email address, and select Next. Choose how to verify it is you, such as a code sent to your recovery email or phone. Enter the code, then set a new password. Hotmail addresses are Microsoft accounts, so this works. If you cannot get a code, choose the account recovery option instead.
I forgot my laptop password. How do I reset it?
If the laptop uses a Microsoft account, go to account.microsoft.com/password/reset from another device and reset it there. The new password works at the sign-in screen after a few minutes. For a local account, sign in with another administrator account and change the password in Settings, or use a password reset disk made earlier.
Still have a question?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!