Recover Windows Password With CMD [Guide]
Forgetting your Windows password can be frustrating, especially when you need to access important files, finish your work, or use your computer for everyday tasks. Fortunately, Windows includes several built-in recovery options that can help you regain access to your account without necessarily reinstalling the operating system.
One method users often search for is recovering a Windows password with Command Prompt (CMD). Command Prompt is a Windows utility that lets you run commands to manage accounts, troubleshoot problems, and perform administrative tasks. However, the commands available depend on whether you can still sign in to Windows or access an authorized recovery environment.
In this guide, you’ll learn how to recover access to your Windows 11 or Windows 10 account using CMD where appropriate.
You’ll also discover what to do if you’ve forgotten your Microsoft account password, lost access to your administrator account, or cannot sign in at all.
Recover Windows Password With CMD

To recover a Windows password with Command Prompt, open CMD with administrator privileges if you can access another administrator account, then use supported account-management commands to manage local accounts. If you’ve forgotten your own password and cannot sign in, use Windows password-reset options, your Microsoft account recovery page, or an authorized Windows recovery method. Windows does not provide a universal CMD command that reveals an existing password or bypasses the sign-in screen.
Before proceeding, identify your account type. A local account is managed directly by your computer, while a Microsoft account uses an email address and password to sign in to Windows and other Microsoft services.
The recovery method differs depending on which account you use.
Step 1: Identify Your Windows Account Type
First, determine whether you’re using a local account or a Microsoft account. This will help you choose the correct recovery method instead of wasting time trying commands that won’t work for your situation.
On the Windows sign-in screen, look at the username displayed beneath your profile picture. If you see an email address, you’re probably using a Microsoft account. If you see a simple username without an email address, you may be using a local account.
You can also check your account type if you’re already signed in through another account. Press Windows + I to open Settings, select Accounts, and review the information displayed under your account profile.
If your computer is connected to a workplace or school, your account may be managed by an organization. In that case, contact your IT administrator if the usual recovery options aren’t available.
Step 2: Try the Built-In Password Reset Option
If you use a local account and have forgotten its password, the Windows sign-in screen may provide a straightforward recovery option.
Start your computer and wait for the Windows sign-in screen to appear. Enter an incorrect password once, then check whether a Reset password option appears. Select it if available.
Windows may ask you to answer the security questions you configured when creating the account. Answer each question carefully. If your answers are accepted, Windows will let you create a new password.
Enter your new password and confirm it. Choose something memorable but difficult for other people to guess. Once the reset is complete, return to the sign-in screen and use your new password.
This method is particularly useful because you don’t need to open Command Prompt or download additional software. However, it won’t work if you never configured security questions or if your account type doesn’t support this recovery option.
Step 3: Reset Your Microsoft Account Password
If you sign in using an Outlook, Hotmail, or another Microsoft account, changing the password through CMD is generally not the right approach. Your Windows sign-in password is associated with your online Microsoft account.
On another device, open Microsoft’s official password-reset page:
Enter your Microsoft account email address and follow the instructions. Microsoft may ask you to verify your identity using a recovery email address, phone number, or another available verification method.
After verifying your identity, create a new password. Return to your Windows computer and connect it to the internet from the sign-in screen if possible.
Enter your updated password. If Windows still rejects it, make sure you’re using the correct account and that the computer has access to the internet. If you normally sign in with a PIN, remember that your Windows Hello PIN is different from your Microsoft account password.
If you cannot access your recovery email or phone number, follow Microsoft’s account-recovery process rather than repeatedly guessing your password.
Step 4: Open Command Prompt From an Administrator Account
If you can sign in to Windows using another administrator account, you can use CMD to manage local user accounts on your computer.
Press Windows + S and type Command Prompt in the search box. When Command Prompt appears in the results, right-click it and select Run as administrator.
If Windows displays a User Account Control prompt, approve it using an authorized administrator account.
A black Command Prompt window will open. You can now run commands with elevated permissions.
To view the local user accounts on your computer, enter the following command and press Enter:
net user
Windows will display the local account names it can identify. Look carefully at the results and note the exact username associated with the account you own.
Keep in mind that this command lists account names, not passwords. It cannot display an existing user’s password in readable form.
Understand What CMD Can and Cannot Do
Command Prompt can help you manage local accounts, but it cannot simply reveal a forgotten Windows password. Windows protects stored credentials rather than keeping them available as readable text.
If you’re signed in as an authorized administrator, the net user command can provide information about local accounts. For example, entering net user lists the account names available on the computer.
However, listing an account is not the same as recovering its password. Some accounts may also be controlled by an organization or Microsoft account settings, which limits what local account-management commands can accomplish.
If your goal is to regain access to your own account, use the sign-in screen’s password-reset option, Microsoft’s official recovery process, or a recovery method provided by your organization.
Avoid instructions that ask you to replace Windows system files, alter accessibility utilities, or manipulate offline account databases to bypass the sign-in screen. These techniques can compromise security, cause system problems, and may not work on current Windows versions.
Use Windows Recovery Options if You Cannot Sign In
If you cannot sign in to any administrator account, the Windows Recovery Environment may provide additional troubleshooting options. However, opening Command Prompt from recovery does not automatically grant permission to reset every account password.
To access recovery options, start at the Windows sign-in screen. Hold down Shift while selecting Power > Restart. Keep holding Shift until Windows opens the recovery menu.
Select Troubleshoot to review the available recovery tools. Depending on your Windows installation, you may see options such as Startup Repair, System Restore, or Reset this PC.
If you choose Reset this PC, read every screen carefully. The option to keep personal files may preserve some files, but it can remove installed applications and settings. Other reset choices may erase personal data.
Before making major changes, check whether you have a backup and whether your device uses BitLocker drive encryption. Recovery may require your BitLocker recovery key.
If your files are important and you don’t have a backup, avoid resetting Windows until you’ve considered safer recovery options. A qualified technician or your organization’s IT administrator may be able to help.
Create a Password Reset Disk for Future Use
Once you’ve regained access to your local Windows account, consider creating a password reset disk so you have another recovery option in the future.
Connect a USB flash drive to your computer. Open Control Panel, select User Accounts, and look for Create a password reset disk if the option is available.
Follow the wizard’s instructions to create the disk. Store the USB drive somewhere secure, because someone with access to it may be able to reset the associated local account password.
This feature is intended for local accounts and may not be available for Microsoft accounts or some managed devices. Creating the disk in advance is important because you generally cannot create it for an account after you’ve already lost access to that account.
FAQs
Can I recover my Windows password using CMD without logging in?
You cannot use a standard CMD command to reveal your forgotten password or universally bypass Windows sign-in. If you cannot log in, try the local account’s Reset password option, recover your Microsoft account online, or use an authorized recovery method.
What is the CMD command to see my Windows password?
There is no supported CMD command that displays your existing Windows password in plain text. The net user command lists local user accounts, but it does not reveal their passwords.
Can I reset a Windows 11 password using CMD?
CMD can manage local accounts when you have the necessary administrator permissions. If you have forgotten your own password and cannot access an administrator account, use Windows’ supported password-reset and recovery options instead.
Does resetting my Windows password delete my files?
Resetting a password through the normal recovery process generally does not delete personal files. However, some recovery scenarios can affect encrypted files, saved credentials, or access to protected data. Creating a backup and checking your encryption settings before major recovery actions is a sensible precaution.
What if I forgot both my Windows password and PIN?
Select the available sign-in options on the Windows sign-in screen. If you’re using a Microsoft account, try I forgot my PIN or reset your Microsoft account password, depending on which options appear. A local account may offer its own password-reset procedure.
Is it possible to recover a password without a reset disk?
Yes. A reset disk is only one option for certain local accounts. Depending on your setup, you may be able to answer security questions, reset your Microsoft account password, use another authorized administrator account, or seek help from your IT administrator.
Summary
Recovering access to a Windows 10 or Windows 11 account depends on the type of account you’re using and whether you can still access an administrator account.
For a local account, start with the sign-in screen’s password-reset option and security questions. For a Microsoft account, use Microsoft’s official online recovery process. If you can access another administrator account, CMD can help you identify local accounts and perform supported account-management tasks.
Remember that Command Prompt cannot directly reveal your forgotten Windows password. If you cannot sign in, choose an authorized recovery method, protect your personal files, and avoid making risky changes to Windows system files.
After regaining access, consider creating a password reset disk or setting up reliable account-recovery options to prevent the same problem from happening again.
