Use Command Prompt only when you are signed in as the device owner or an authorized administrator. If you are locked out, start with Microsoft-supported recovery options instead of changing system files from the sign-in screen.
Windows 11 password recovery depends on the account type. A Microsoft account, local account, password reset disk, another administrator account, work or school device, and BitLocker-encrypted device all require different recovery paths. This guide explains the safest options first, then shows when CMD is appropriate for a local account.
Last checked on Windows 11 24H2 and current Microsoft account recovery guidance. The CMD steps below were written for local accounts where an administrator can already sign in to the PC.

Important safety note
Before trying CMD, identify the type of account and recovery access you have. This prevents wasted time and avoids risky changes that may not work on your device.
Which case applies to you?
If your Windows 11 sign-in uses an email address such as Outlook.com, Hotmail, Live, or another Microsoft account, do not use CMD. Reset the password through Microsoft's account recovery page, then sign in to Windows with the new password after the device is online.
Step 1 Go to Microsoft's password reset page from another device or browser.
Step 2 Verify your identity using the recovery email, phone number, authenticator app, or other method attached to the account.
Step 3 Create a new Microsoft account password, then connect your Windows 11 PC to the internet and sign in again.
Local accounts are stored on the PC itself. Microsoft-supported recovery depends on whether you set up security questions, created a password reset disk, or have another administrator account on the same device.
Local account options
CMD is appropriate when you can already sign in with an administrator account and need to change a local account password. This does not reset a Microsoft account password, and it should only be used by the device owner or an authorized administrator.
Step 1 Click the Search icon on your Windows 11 taskbar. Type cmd, then click Run as administrator when Command Prompt appears.

Step 2 If the User Account Control dialog appears, click Yes.

Step 3 List local user accounts so you can confirm the exact account name.
net user

Step 4 Change the password for the local account. To avoid showing the new password on screen, use an asterisk and enter the password when prompted.
net user "username" *
Replace username with the local account name. If the command completes successfully, sign in with the new local account password.
What the commands mean

If you cannot sign in to any administrator account, avoid unsupported sign-in screen workarounds that modify Windows system files. They can weaken device security, fail on BitLocker-protected systems, violate workplace policy, or make Windows harder to repair.
Safer locked-out options
Many Windows 11 devices use device encryption or BitLocker. If Windows Recovery asks for a BitLocker recovery key, you need that key to continue. Check your Microsoft account, printed records, USB backups, or your organization's IT portal if the device is managed.
Before using recovery tools
If the command does not work, check the message in Command Prompt before trying another recovery path. Most failures are caused by account type, permissions, or encryption.
Common problems and fixes
The recommendations above were checked against these Microsoft resources:
Q: Can I reset a Microsoft account password with CMD?
A: No. A Microsoft account password is managed online by Microsoft. Use Microsoft's password reset page, then sign in to Windows after the device is connected to the internet.
Q: When should I use CMD to reset a Windows 11 password?
A: Use CMD only when you are already signed in as the device owner or an authorized administrator and are changing a local account password.
Q: What if I am completely locked out?
A: Use Microsoft account recovery, local account security questions, a password reset disk, another administrator account, or Reset this PC. On work or school devices, contact IT support.
Q: What if BitLocker asks for a recovery key?
A: You need the BitLocker recovery key to continue. If you cannot find it, Microsoft says you may need to reset the device, which can cause data loss.
Q: What does the net user command do in Windows 11?
A: The net user command lists local user accounts. When an authorized administrator runs Command Prompt as administrator, it can also change a local account password.
Q: What should I do if CMD says access is denied?
A: Run Command Prompt as administrator and confirm you are signed in with an administrator account. If you cannot sign in as an administrator, use Microsoft account recovery, a password reset disk, security questions, another administrator account, or your organization's IT support.
Command Prompt can help an authorized administrator change a local Windows 11 account password, but it is not the right tool for Microsoft accounts or unmanaged locked-out scenarios. Start with Microsoft-supported recovery options, keep your BitLocker recovery key available, and use tools such as iSumsoft Windows Password Refixer only on devices you own or are authorized to repair.