How to find computer username and password in Windows 11

To find your computer username in Windows 11, open Command Prompt and type whoami; Windows shows it as computername\username, but it never displays your sign-in password, so a forgotten password has to be reset.

This guide covers every way to see the username, the difference between local and Microsoft account sign-ins, and the official reset routes for each account type.

How to find computer username and password in Windows 11
The sign-in screen shows the account name, but Windows never displays the password, so a forgotten one has to be reset. (Image: Microsoft)

How to find computer username and password in Windows 11/10

The username takes one command. The password is a different job: Windows stores it in a form you cannot read back, so the only route to a forgotten one is a reset.

  1. Press the Windows key, type cmd and select Command Prompt.
  2. Type whoami and press Enter.
  3. Read the result: the part before the backslash is the computer or domain name, and the part after it is your username.
  4. If you sign in with a Microsoft account, your sign-in username is that account's email address.
  5. If you have forgotten the password, lock the PC with Windows key + L and select I forgot my password on the sign-in screen.

The same command works in Windows 10 and in Windows Terminal or PowerShell.

Local account vs Microsoft account username in Windows 11

What counts as your username, and how a lost password is recovered, depends on which kind of Windows sign-in account you use.

Account type Your username Password stored Forgotten password route
Microsoft account The email address of the account (Outlook.com, Hotmail or another address) Online with Microsoft I forgot my password on the sign-in screen, Web sign-in, or Microsoft's Reset password page in any browser
Local account A name created on this PC only On this PC only Security questions on the sign-in screen, a password reset disk, or another administrator account
Work or school account The address your organization issued With your organization Your organization's IT support or password page

To check which type you have, open Settings > Accounts > Your info. The link Sign in with a Microsoft account instead appears only on a local account, and Sign in with a local account instead appears only on a Microsoft account.

Microsoft account username in Windows 11 shown as an email address in Start
For a Microsoft account, the sign-in username is the email address shown under the account name. (Image: Microsoft)

Find computer username with the whoami command

whoami

Shows the domain (or computer) name and user name of the account signed in right now. Add /upn to show the name in user principal name format, /user to add the account's security identifier (SID), or /all for groups and privileges as well.

You should see: One line such as desktop-a1b2c3\maria: the text after the backslash is the username.

List all user accounts on Windows 11 with net user

net user

Run without parameters, net user lists every user account on the computer. Type net user followed by an account name, for example net user maria, to see details for that account.

You should see: A list of the account names on the computer, ending with a line saying the command completed successfully.

The list can include built-in accounts you never created, such as the disabled built-in Administrator account. Your own account is the one that matches the whoami result.

Find Windows 11 usernames with PowerShell Get-LocalUser

Get-LocalUser

Lists the local user accounts on the PC, including built-in accounts, accounts you created and local accounts connected to Microsoft accounts, with an Enabled column for each.

You should see: A table with Name, Enabled and Description columns. An account connected to a Microsoft account appears as MicrosoftAccount\ followed by the email address when you query it by that name.

Find your computer username in Windows 11

Use this route if you would rather not open a command window. It shows the account names Windows displays and tells you the account type.

  1. Select Start on the taskbar.
  2. Select your account name or picture at the bottom of the Start menu to see the signed-in account and the other users you can switch to.
  3. Open Settings and select Accounts > Your info.
  4. Check the links on that page: Sign in with a Microsoft account instead means you use a local account, and Sign in with a local account instead means you use a Microsoft account.
  5. For a list of every account on the PC, select Accounts > Other users.

The name on the Start menu is the name of the signed-in account. For a Microsoft or work account it comes from the online account, so use whoami when you need the exact sign-in name.

Find your computer username in Windows 11 from the Start menu account list
Select your account name at the bottom of Start to see the other users you can switch to. (Image: Microsoft)

Find usernames in Computer Management Local Users and Groups

Computer Management lists every local account with its full name. You need an administrator account to make changes here.

  1. Press the Windows key, type Computer Management and open it.
  2. In the left pane, expand Local Users and Groups.
  3. Select Users.
  4. Read the Name column for each username on the PC.

Computer name vs username in Windows 11

Many people searching for the computer username actually need the device name, for example to connect from another PC. They are two separate values.

Value Where to see it Example
Username whoami (after the backslash), net user, Get-LocalUser, Settings > Accounts > Other users maria
Microsoft account username The email address you also use for Outlook.com, OneDrive or Xbox [email protected]
Computer (device) name Settings > System > About, and whoami before the backslash DESKTOP-A1B2C3

To change the device name, select Rename this PC on the About page, enter a new name, and restart.

Reset or recover your Windows sign-in password

Microsoft support cannot retrieve or bypass a lost Windows password, so the reset routes below are the only official way back in. Pick the one that matches your account type.

  1. Microsoft account: at the sign-in screen, select I forgot my password and follow the prompts.
  2. Microsoft account, alternative: select Sign-in options > Web sign-in, sign in, then select Forgot my password.
  3. Microsoft account, from another device: open Microsoft's Reset password page in any browser, enter the username, and verify with a code sent to your recovery email or phone.
  4. Local account: select the arrow next to the password box, select OK, then Reset password, and answer your security questions.
  5. Local account with a reset disk: select Use a password reset disk instead and follow the instructions.
  6. If you are signed in and know the old password, open Settings > Accounts > Sign-in options, select Password > Change and follow the instructions.

A Windows Hello PIN is separate from the account password. I forgot my PIN on the sign-in screen is offered only for Microsoft accounts; on a local account, sign in with the password first and reset the PIN in Settings.

Reset Windows sign-in password for a local account with security questions
Local accounts reset through these three security answers; a Microsoft account uses I forgot my password instead. (Image: Microsoft)

Reset a local account password from another administrator account

If someone else on the PC has an administrator account, that account can set a new password for yours without the security questions.

  1. Sign in with the administrator account.
  2. Open Computer Management.
  3. Expand Local Users and Groups > Users.
  4. Right-click the account that is locked out and select Set Password….
  5. Enter the new password, confirm it, and select OK.

If there is no other administrator account and the security questions fail, Microsoft's only remaining option for a local account is to reset the PC.

Find your Microsoft account username if you forgot it

If you do not remember which email address signs in to Windows, Microsoft can show a hint of it after verifying your security contact.

  1. On any device, open Microsoft's Forgotten your Microsoft account username support page and select Search.
  2. Enter the security contact phone number or email address you added to the account.
  3. Request a security code and enter it, then select Next.
  4. Read the username hint, shown in a format such as j****@outlook.com.
  5. If the lookup fails, check the products tied to the account, such as Outlook.com, Xbox or Microsoft 365, for the address they sign in with.

Where Windows stores saved passwords: Credential Manager

Credential Manager holds passwords Windows saved for websites, connected apps and network shares. It does not show your own Windows sign-in password.

Section What it holds How to open it
Web Credentials Sign-ins saved for websites Type credential manager in the taskbar search box and select Credential Manager Control panel, then Web Credentials
Windows Credentials Sign-ins for network locations, connected apps and other PCs Same window, select Windows Credentials

Browser passwords live in the browser instead. You can find saved passwords on Windows 11 in Edge, Chrome and Windows, and for a network key, find your Wi-Fi password from the network settings.

Windows saved passwords in Credential Manager with Web and Windows Credentials
Credential Manager holds sign-ins for websites, apps and network shares, not your own Windows sign-in password. (Image: Microsoft)

Create a password reset disk for a local account in Windows 11

A local account has no online reset. A reset disk on a USB flash drive is the backup if you forget the password and lose the security question answers.

  1. Sign in with the local account the disk is for; the option is not offered for Microsoft accounts.
  2. Plug in a USB flash drive.
  3. Type Control Panel in the taskbar search box and open it.
  4. Type create password reset in the Control Panel search box.
  5. Select Create a password reset disk and follow the remaining instructions.
  6. Remove the drive and keep it somewhere safe; it keeps working after you change the password.

Windows 11 computer username and password FAQ

How do I check what my PC username is?

Open Command Prompt, type whoami and press Enter. The text after the backslash is your username. PowerShell users can run Get-LocalUser instead to list every local account with its Enabled status.

How do I open my PC if I forgot my password in Windows 11?

Select I forgot my password on the sign-in screen for a Microsoft account, or answer the security questions for a local account. Another administrator can also set a new password in Computer Management. Without any of these, the remaining option is resetting the PC.

How do I find my computer username and password?

Run whoami in Command Prompt for the username. Windows never displays the sign-in password, so if you have forgotten it, reset it from the sign-in screen or through Microsoft's Reset password page for a Microsoft account.

Where do I find my username on my computer?

Select Start, then your account picture, to see the signed-in name, or open Settings > Accounts > Other users for the other accounts. For the exact sign-in name, run whoami in Command Prompt or net user to list every account on the PC.

How do I know my PC username without signing in?

The sign-in screen shows the account names to choose from when a PC has more than one user. For a Microsoft account, the username is the email address, and Microsoft's username lookup can show a hint of it from your security phone number or email.

What's my computer username if I use a Microsoft account?

Your sign-in username is the Microsoft account email address. Settings > Accounts > Your info confirms the account type, and Microsoft's username lookup shows a hint of the address if you have forgotten it.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

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