Skip to content
Follow
Windows

How to Change Windows 11 Password via Command Prompt

Richard
Written by
Richard
Jan 2, 2022 Updated Aug 13, 2026 2 min read
How to Enable or Disable Microsoft Defender Cloud Protection
How to Enable or Disable Microsoft Defender Cloud Protection

Changing your Windows 11 password through the Command Prompt lets you update your login details in under a minute without opening the main Settings app . The Command Prompt is a built-in text tool that lets you run system tasks by typing short text commands.

You can use the built-in `net user` command to set a brand new password instantly. This method works fast when you get locked out of your PC and need to get back in right away.

⚡ Quick Answer

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

The built-in Settings app offers a graphical interface for updating credentials. Both Microsoft accounts and local profiles support this standard route. Open Settings, navigate to Accounts, then Sign-in options, select Password, and click Change to complete the workflow.

  1. Open the Start menu and click the Settings gear icon.
  2. Select Accounts from the left sidebar.
  3. Click on Sign-in options.
  4. Choose Password and click the Change button.
  5. Follow the on-screen prompts to verify your identity and set a new password.
Searching and opening Windows Terminal in Windows 11
windows terminal search and open

Microsoft Account vs. Local Account

Account classification dictates the correct reset path. Microsoft accounts tie directly to cloud profiles, requiring updates through the official online portal. Local accounts exist exclusively on the physical machine.

Changing Password via Command Prompt (Admin Required)

Terminal-based credential updates require elevated administrator rights. Launching an elevated console provides the necessary permissions for system modifications.

Access the terminal with administrative privileges by searching for Command Prompt in the Start menu , right-clicking the result, and selecting Run as administrator.

2. View your existing user accounts by typing `net user` and pressing Enter.

💻Code
net user
Listing users in Command Prompt on Windows 11
windows list users command prompt

3. Update the credentials using the net user USERNAME * command.

💻Code
net user USERNAME *
Successfully changed user password in Windows 11
successfully changed user password windows 11

Changing Password via PowerShell (Admin Required)

PowerShell offers an alternative administrative interface for modifying account credentials. Launching an elevated console allows queries via Get-LocalUser. Next, generate a secure string variable to hold the new credentials safely before applying them to the system.

1. Open PowerShell as an administrator.

2. View your local users with this command:

PowerShell
Get-LocalUser
Listing users using PowerShell in Windows 11
windows 11 list users powershell

3. Create a secure password variable and apply it to your account:

PowerShell
$Password = Read-Host "Enter the new password" -AsSecureString

4. Use these commands to finalize the change:

PowerShell
$UserAccount = Get-LocalUser -Name "USERNAME"
$UserAccount | Set-LocalUser -Password $Password

Summary

Standard desktop users rely on the Settings app, while system administrators prefer the speed of Command Prompt and PowerShell.

Can I change my 🪟 Windows 11 password without knowing the old one?

Forgotten credentials prevent direct in-session updates. Triggering the account recovery workflow from the sign-in screen restores access.

Is it safer to use a PIN or a password in 🪟 Windows 11?

Local hardware tokens secure PINs against remote extraction, offering stronger protection than traditional passwords.

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Create a Password Reset Disk for Windows 11
Windows How to Create a Password Reset Disk for Windows 11
How to Reset Your Microsoft Account Password
Windows How to Reset Your Microsoft Account Password
How to Change or Reset Your Windows 11 Password
Windows How to Change or Reset Your Windows 11 Password
How to Change your Microsoft Account Password
Windows How to Change your Microsoft Account Password

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *