Windows

How to Change Windows 11 Password via Command Prompt

Richard
Written by
Richard
Jan 2, 2022 Updated Apr 15, 2026 2 min read

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.

Searching and opening Windows Terminal in Windows 11

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:

💻Code
net user
Listing users in Command Prompt on Windows 11

To change your password, type the following command, but replace USERNAME with your actual account name:

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

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:

PowerShell
Get-LocalUser
Listing users using PowerShell in Windows 11

To set a new password, you first need to create a secure password variable. Type this command and press Enter:

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

After typing your new password, use these commands to apply it to your account. Remember to replace USERNAME with your account name:

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

If 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?

Tags: #Windows 11
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights 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.

Leave a Reply

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

Exit mobile version