To convert a SID to a user or group name in Windows, run ([System.Security.Principal.SecurityIdentifier]"S-1-5-32-544").Translate([System.Security.Principal.NTAccount]).Value in PowerShell, and reverse it with the NTAccount class to turn a username into a SID.
This guide covers local accounts, Active Directory users and groups, the machine and domain SID, well-known SIDs, PsGetSid, and the errors that stop a lookup.

Convert username to SID and SID to username in PowerShell
Both directions use .NET classes that ship with Windows PowerShell 5.1 and PowerShell 7. No module or admin rights are needed for local and domain accounts the computer can resolve.
- Press Win + X and select Terminal or Windows PowerShell.
- To get the SID of a user, run
([System.Security.Principal.NTAccount]"CONTOSO\jsmith").Translate([System.Security.Principal.SecurityIdentifier]).Value, replacingCONTOSO\jsmithwith the domain or computer name and the account name. - Read the result: a string that starts with
S-1-5-21-is the account SID. - To get the name behind a SID, run
([System.Security.Principal.SecurityIdentifier]"S-1-5-21-...-1001").Translate([System.Security.Principal.NTAccount]).Valuewith the full SID pasted in. - Read the result in
DOMAIN\nameform, for exampleBUILTIN\AdministratorsforS-1-5-32-544.
If Windows cannot map the value, PowerShell throws IdentityNotMappedException. The troubleshooting section below explains what that means.
What is a security identifier (SID) in Windows?
A SID is the unique value Windows uses to identify a user, group, computer or service account. Windows refers to accounts internally by SID, and permissions in access control lists store SIDs rather than names.
Windows generates the SID when the account is created and never reuses it. Delete an account and recreate it with the same name, and it gets a new SID with none of the old permissions.
| Part of S-1-5-21-1004336348-1177238915-682003330-512 | Value | Meaning |
|---|---|---|
| S | S | Marks the string as a SID |
| Revision | 1 | Version of the SID structure |
| Identifier authority | 5 | NT Authority issued it (1 is World Authority, used by Everyone) |
| Domain identifier | 21-1004336348-1177238915-682003330 | Identifies the domain, or the computer for a local account |
| Relative identifier (RID) | 512 | Identifies the account or group inside that domain (512 is Domain Admins) |
Local account SIDs are created by the Local Security Authority on the PC and stored in the registry. Domain SIDs are created by the domain and stored in the objectSID attribute of the Active Directory object.

How to find a local user security identifier (SID)
Use whoami for the account you are signed in with and Get-LocalUser for any other local account. If you also need to manage local users and groups from the command line, the same PowerShell module handles it.
- Open Command Prompt or PowerShell from the Start menu.
- Run
whoami /userto show your ownDOMAIN\username and SID in a table. - Run
whoami /user /fo listif the SID is cut off or you want to copy it more easily. - In PowerShell, run
Get-LocalUser | Select-Object Name, SIDto list every local account with its SID. - Run
Get-LocalUser -Name "jsmith" | Select-Object Name, SIDto show one account. - Run
Get-LocalGroup | Select-Object Name, SIDto list local groups such as Administrators and Users with their SIDs. - For the WMI route, run
Get-CimInstance -ClassName Win32_UserAccount -Filter "LocalAccount=True" | Select-Object Name, SID.
Run the local accounts cmdlets in 64-bit PowerShell. Microsoft notes that the Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit system.

whoami /all command to see user and group SIDs
whoami /all prints everything in your current access token: your user SID, the SID of every group you belong to, and your privileges.
whoami /all /fo list
/all shows the user name, user SID, group names with their SIDs and the privileges in the current token. /fo list prints each entry on its own lines; /fo csv gives comma-separated output for a spreadsheet.
You should see: A USER INFORMATION block with your SID, followed by a GROUP INFORMATION block listing entries such as BUILTIN\Users with S-1-5-32-545.
The token reflects the moment you signed in. A group you were added to afterwards only appears after you sign out and back in.
How to get a user or group SID in Active Directory
The Get-ADUser and Get-ADGroup cmdlets return a SID property for every object. They live in the Active Directory module, which is installed on domain controllers and comes with RSAT on Windows 11 and Windows 10 Pro, Enterprise and Education.
- On a workstation, open Settings > System > Optional features and select View features or Add a feature.
- Search for RSAT: Active Directory Domain Services and Lightweight Directory Services Tools, select it and install it.
- Open PowerShell and run
Get-ADUser -Identity jsmith | Select-Object Name, SamAccountName, SIDto get a domain user's SID. - Run
Get-ADGroup -Identity "Domain Admins" | Select-Object Name, SIDto get a domain group's SID. - Run
Get-ADUser -Filter 'Name -like "*SvcAccount"' | Select-Object Name, SIDto list SIDs for several users that match a name pattern. - Add
-Server dc01.contoso.comto any of these commands to query a specific domain controller.
RSAT cannot be installed on Home editions of Windows. On a Home PC, use the NTAccount translation from the first section, which works for any domain the PC can resolve.

Getting the local machine and domain SID of a computer
A computer has two different SIDs. The local machine SID is the domain identifier shared by every local account on that PC. The domain computer account SID belongs to the computer object in Active Directory and is a separate value.
- To get the local machine SID, run
psgetsidwith no arguments, orpsgetsid \\PC01for a remote computer, using PsGetSid from Microsoft Sysinternals. - Without PsGetSid, run
Get-LocalUser | Where-Object SID -like "*-500" | Select-Object Name, SIDto show the built-in Administrator account SID. - Remove the final
-500from that SID: what remains is the local machine SID. - To get the domain SID, run
(Get-ADDomain).DomainSID.Valueon a PC with the Active Directory module. - To get a computer's domain account SID, run
Get-ADComputer -Identity PC01 | Select-Object Name, SID.
Every domain account SID starts with the domain SID, followed by the account RID. That makes the domain SID a quick way to tell whether an unknown SID belongs to your domain.

How to convert a SID to a user or group name
Pick the command that matches where the account lives. The .NET translation is the most general, because it asks Windows to resolve the SID against the local PC and every trusted domain.
- Copy the full SID, for example from an event log entry, a folder's security tab or a registry key name.
- For any account, run
([System.Security.Principal.SecurityIdentifier]"S-1-5-21-...-1001").Translate([System.Security.Principal.NTAccount]).Valuein PowerShell. - For a local user, run
Get-LocalUser -SID S-1-5-21-...-1001to return the account name, status and description. - For a local group, run
Get-LocalGroup -SID S-1-5-32-544. - For a domain user, run
Get-ADUser -Identity S-1-5-21-...-1105, because-Identityaccepts a SID as well as a name. - For a domain group, run
Get-ADGroup -Identity S-1-5-21-...-512. - With PsGetSid, run
psgetsid S-1-5-21-...-1001to print the matching account name.
To convert many SIDs at once, put them in a text file and run Get-Content sids.txt | ForEach-Object { ([System.Security.Principal.SecurityIdentifier]$_).Translate([System.Security.Principal.NTAccount]).Value }.
PsGetSid command to convert SID to username and back
PsGetSid is a free Microsoft Sysinternals command-line tool in the PsTools kit. It translates SIDs to names and names to SIDs for built-in, local and domain accounts, on the local PC or remote computers.
psgetsid \\PC01 -u CONTOSO\admin administrator
\\PC01 runs the lookup on a remote computer (omit it for the local PC, or use \\* for every computer in the domain). -u supplies an account with admin rights on the target; PsGetSid prompts for the password if -p is left out. The last argument is the account name to resolve, or a SID to turn into a name.
You should see: PsGetSid prints the SID for the named account, or the DOMAIN\name for a SID you passed in.
Copy PsGetSid into a folder on your executable path so psgetsid works from any prompt. It runs on Windows 8.1 and later and Windows Server 2012 and later.
wmic useraccount get name,sid alternative in Windows 11
Older guides use wmic useraccount get name,sid. Microsoft deprecated WMIC in Windows 10 version 21H1, and its August 2026 update states WMIC is removed and no longer offered as a Feature on Demand on Windows 11, version 24H2 and later.
| Old WMIC command | PowerShell replacement | Why |
|---|---|---|
wmic useraccount get name,sid |
Get-CimInstance -ClassName Win32_UserAccount | Select-Object Name, SID |
Same WMI class, read through PowerShell instead of WMIC |
wmic useraccount where name='jsmith' get sid |
Get-LocalUser -Name jsmith | Select-Object SID |
Shortest route for one local account |
wmic useraccount where sid='S-1-5-...' get name |
Get-LocalUser -SID S-1-5-... |
Takes the SID directly and returns the account |
wmic group get name,sid |
Get-LocalGroup | Select-Object Name, SID |
Lists local groups with their SIDs |
Well-known SIDs list in Windows
Well-known SIDs are the same on every Windows installation, so you can recognise them without running a lookup. In entries marked domain, that part is replaced by the domain or machine identifier.
| SID | Name | What it identifies |
|---|---|---|
| S-1-1-0 | Everyone (World) | A group that includes all users |
| S-1-5-11 | Authenticated Users | All users and computers that have authenticated, excluding Guest |
| S-1-5-18 | System (LocalSystem) | The operating system and services that run as LocalSystem |
| S-1-5-19 | LocalService | Services with limited local rights and anonymous network access |
| S-1-5-20 | NetworkService | Services with limited local rights that use the computer's identity on the network |
| S-1-5-32-544 | Administrators | The built-in Administrators group |
| S-1-5-32-545 | Users | The built-in Users group |
| S-1-5-32-546 | Guests | The built-in Guests group |
| S-1-5-32-555 | Remote Desktop Users | Members can sign in remotely |
| S-1-5-domain-500 | Administrator | The built-in Administrator account of a PC or domain |
| S-1-5-domain-501 | Guest | The built-in Guest account |
| S-1-5-domain-512 | Domain Admins | Global group that administers the domain |
| S-1-5-domain-513 | Domain Users | Global group of every user in the domain |
SID cannot be translated to a name in PowerShell
IdentityNotMappedException: Some or all identity references could not be translated
Windows found no account for that SID or name, usually because the account was deleted or belongs to a domain the PC cannot reach.
- Check that you copied the whole SID, including the final RID after the last hyphen.
- Run the lookup again on a PC joined to the domain that owns the SID, or on a domain controller.
- If the domain part matches your domain but nothing resolves, treat it as a deleted account: its SID is never reused, so permissions that list it can be removed.
Get-ADUser is not recognized as the name of a cmdlet
The Active Directory module is not installed on this PC.
- Open Settings > System > Optional features.
- Add RSAT: Active Directory Domain Services and Lightweight Directory Services Tools.
- Close and reopen PowerShell, then run the command again.
Get-LocalUser is not recognized or the LocalAccounts module will not load
The command is running in 32-bit PowerShell on 64-bit Windows, where the module is unavailable.
- Close the current window.
- Open Windows PowerShell or Terminal from the Start menu rather than the (x86) shortcut.
- Run
Get-LocalUseragain.
'wmic' is not recognized as an internal or external command
WMIC is removed from Windows 11, version 24H2 and later.
- Open PowerShell.
- Use
Get-CimInstance -ClassName Win32_UserAccount | Select-Object Name, SIDin place of the WMIC command. - Use the replacement table above for other WMIC SID commands.
SID to username FAQ
How do I find my own SID in Windows 11?
Open Command Prompt or PowerShell and run whoami /user. Windows prints your DOMAIN\username and the SID of the account you are signed in with. Add /fo list if the SID is cut off in the table view.
How do I find the SID of another local user?
Run Get-LocalUser -Name "username" | Select-Object Name, SID in PowerShell. To see every local account at once, run Get-LocalUser | Select-Object Name, SID. Use 64-bit PowerShell, because the module does not load in the 32-bit version.
How do I convert a SID to a username in PowerShell?
Cast the SID to the SecurityIdentifier class and translate it: ([System.Security.Principal.SecurityIdentifier]"S-1-5-…").Translate([System.Security.Principal.NTAccount]).Value. The result is the DOMAIN\name of the user or group that owns the SID.
How do I get a user's SID from Active Directory?
Run Get-ADUser -Identity username | Select-Object Name, SID. The cmdlet is part of the Active Directory module, which comes with RSAT on Windows 11 and 10 Pro or Enterprise and is already present on domain controllers.
What is the difference between the machine SID and the domain SID?
The machine SID is the identifier shared by all local accounts on one PC. The domain SID is the identifier shared by all accounts in an Active Directory domain. Each account SID is one of these followed by the account's relative identifier.
What does S-1-5-32-544 mean?
S-1-5-32-544 is the well-known SID of the built-in Administrators group. It is the same on every Windows installation: 5 is NT Authority, 32 is the Builtin domain and 544 is the Administrators relative identifier.
Why does a SID show instead of a name in folder permissions?
Windows shows the raw SID when it cannot resolve it to an account. The account was usually deleted, or it belongs to a domain the PC cannot contact. Deleted SIDs are never reused, so a new account with the same name does not regain that access.
Can two users have the same SID?
No. Windows never issues the same SID twice within its scope and never reuses SIDs from deleted accounts. Well-known SIDs such as Everyone are identical across computers by design, because they identify generic groups rather than individual accounts.


![Among Us with friends: How to play online and local [step-by-step guides]](https://techdows.com/wp-content/uploads/2026/12/Among-Us-with-friends-How-to-play-online-and-local-step-by-step-guides-1-600x338.jpg)


