Search

How to find SIDs of local user accounts

If you are not familiar with Security Identifiers (SIDs), please visit the next link to understand what are Security Principals and Security Identifiers (SIDs).

All the examples shown in this lesson to find the SIDs of local user accounts were run on PowerShell terminal. Please click the following link to learn how to open PowerShell terminal in a Windows Server, if you are new to PowerShell.

In Windows Operating Systems, a SID (Security Identifier) is used to identify a Security Principal. A Security Principal is someone who can be authenticated by the Operating System. Security Principal can be a local user, domain user, local computer, domain computer etc. SIDs are binary values stored in a local Windows Server or in Active Directory Domain Controllers. For the purpose of humans to comprehend and handle with ease, Windows Operating Systems display the binary SID values as long strings.

Find SIDs of all local user accounts using Get-LocalUser PowerShell cmdlet

Get-LocalUser PowerShell cmdlet can be used to find the SIDs of all local users in a Windows Server. Run Get-LocalUser PowerShell cmdlet as shown below to find SIDs of all local user accounts in a Windows Server.


PS C:\jajish> Get-LocalUser | Select name,sid

Name               SID
----               ---
Administrator      S-1-5-21-3145586660-3425903922-524180734-500
DefaultAccount     S-1-5-21-3145586660-3425903922-524180734-503
Guest              S-1-5-21-3145586660-3425903922-524180734-501
jajish             S-1-5-21-3145586660-3425903922-524180734-1006
WDAGUtilityAccount S-1-5-21-3145586660-3425903922-524180734-504



 

Please refer below image to find how to use Get-LocalUser PowerShell cmdlet to find the SIDs of all local user accounts.

find-sids-of-all-users-get-localuser.jpg

 

Find the SID of current logged–in user using Get-LocalUser PowerShell cmdlet

You may use Get-LocalUser PowerShell cmdlet to find the SID of current logged–in user in a Windows Server. Use Get-LocalUser PowerShell cmdlet as shown below to find the SID of current logged–in user in a Windows Server. Please replace the login name "jajish" in below Get-LocalUser PowerShell cmdlet with your logged-in user name.




PS C:\jajish> Get-LocalUser jajish | Select name,sid

Name   SID
----   ---
jajish S-1-5-21-3145586660-3425903922-524180734-1006



 

Please refer below image to learn how to find the SID of current logged–in user in a Windows Server, using Get-LocalUser PowerShell cmdlet.

find-sid-of-current-logged-in-user-get-localuser.jpg

 

Find SIDs of all local user accounts using Get-WmiObject PowerShell cmdlet

Get-WmiObject PowerShell cmdlet can be used to find the SIDs of all local user accounts in a Windows Server. Use Get-WmiObject PowerShell cmdlet as shown below to find SIDs of all local user accounts in a Windows Server.


PS C:\jajish> Get-WmiObject Win32_UserAccount | Select name,sid

name               sid
----               ---
Administrator      S-1-5-21-3145586660-3425903922-524180734-500
DefaultAccount     S-1-5-21-3145586660-3425903922-524180734-503
Guest              S-1-5-21-3145586660-3425903922-524180734-501
jajish             S-1-5-21-3145586660-3425903922-524180734-1006
WDAGUtilityAccount S-1-5-21-3145586660-3425903922-524180734-504


PS C:\jajish>

 

Please refer below image to find how to use Get-WmiObject PowerShell cmdlet to find the SIDs of all local user accounts.

find-sids-of-all-users-get-wmiobject.jpg

 

Find SID of current logged–in user using Get-WmiObject PowerShell cmdlet

You may use PowerShell cmdlet Get-WmiObject to find the SID of current logged–in user in a Windows Server. Use Get-WmiObject PowerShell cmdlet as shown below to find the SID of current logged–in user in a Windows Server. Please replace the login name "jajish" in the below Get-WmiObject PowerShell cmdlet output with your logged-in user name.



PS C:\jajish>  Get-WmiObject Win32_UserAccount -Filter "name='jajish'"


AccountType : 512
Caption     : OMNISECU-7\jajish
Domain      : OMNISECU-7
SID         : S-1-5-21-3145586660-3425903922-524180734-1006
FullName    : Jajish Thomas
Name        : jajish


 

Please refer below image to learn how to find the SID of current logged–in user in a Windows Server, using Get-WmiObject PowerShell cmdlet.

find-sid-of-current-logged-in-user-get-wmiobject.jpg

 

Find SID of current user using whoami.exe tool

You may use the whoami.exe tool to find the SID of the current logged-in user, as shown below


PS C:\jajish> whoami /user

USER INFORMATION
----------------

User Name                SID
======================== ============================================
omnisecu-7\administrator S-1-5-21-3145586660-3425903922-524180734-500
PS C:\jajish>


 

Please refer below image to learn how to use whoami.exe tool to find the SIDs of current logged–in user.

find-sids-of-all-users-get-whoami.jpg

 

Written by Jajish Thomas.
Last updated on 21st August, 2024.

 

Related Tutorials
Introduction to Windows Server 2025
Minimum hardware requirements for Windows Server 2025
New features of Windows Server 2025
How to download Windows Server 2025 Preview iso file
How to install Windows Server 2025
Differences between Server Core and GUI (Desktop Experience)
Default GUI tools in Server Core
How to run PowerShell as administrator
How to run PowerShell as administrator in Server Core
How to find the PowerShell version in Server Core and Desktop experience
How to add Network icon to desktop in Windows Server 2025
How to add Computer (This PC) icon to desktop in Windows Server 2025
How to rename a computer using Windows Explorer
How to rename computer using "Rename-Computer" PowerShell Cmdlet
How to configure IPv4 Address in Windows Server 2025
How to configure IPv4 address in Windows Server 2025 using PowerShell Cmdlets
How to configure IPv6 Address in Windows Server 2025
How to configure IPv6 Address in Windows Server 2025 using PowerShell
What is MMC (Microsoft Management Console) and what are MMC snapin files
Add a snapin to MMC console
What are Roles and Features and difference between Roles and Features in Windows Server
Roles in Windows Server
Features in Windows Server
How to add Roles and Features in Windows Server
How to Remove Roles and Features in Windows Server
How to add Roles and Features using PowerShell
How to remove Roles and Features using PowerShell
Different types of computer hardware devices
What is a Driver Software
What is Device Manager and how to open Device Manager
What is Plug and Play (PnP)
How to scan for hardware changes using Device Manager and pnputil.exe
How to disable a device using Device Manager
How to disable a device using PowerShell Disable-PnpDevice Cmdlet
How to enable a device using PowerShell Enable-PnpDevice Cmdlet
How to update drivers using Device Manager
What is Driver Signing in Windows Operating Systems
What is Roll back of a driver and how to Roll Back a driver
How to uninstall a device using Device Manager
What are File attributes in Windows Operating Systems
attrib command in Windows
How to hide files and folders using Windows File Explorer
How to hide files and folders using attrib.exe command
How to view hidden files using Windows File Explorer
What are file name extensions
What are known file extensions and how to view known file extensions
How to associate a file name extension with an app
Hide or Show known file name extensions in Windows Server 2025
Hide or Show protected operating system files in Windows Server 2025
What are multi–user Operating Systems (OS) and multi–task Operating Systems (OS)
What are local user accounts and local groups in Windows Server
Different types of user accounts in Windows Server
How to create a local user in Windows Server
How to create a local user in Windows Server using New-LocalUser PowerShell cmdlet
How to force a local user to change password on next login
How to enable or disable a local user account
How to allow or prevent a local user to change password
What are Security Principals and SIDs
How to find SIDs of local user accounts