I sometimes need a quick and easy way of determining a user’s Active Directory SID (for example, when performing forensics on the Recycle Bin). Yes, there are ways to find out a SID in ADUC (check out how here) – but I think that utilizing PowerShell is more efficient in this case.
To find a user’s SID, within PowerShell run the following (replacing <domain> and <user> with the appropriate information for your query):
$objUser = New-Object System.Security.Principal.NTAccount(<domain>,<user>) $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) $strSID.Value
To further enhance efficiency, I’ve actually wrapped this into a parametrized PowerShell script, which you can feel free to download here. Remember, that in order to get the script to run, you need to set your execution policy to “RemoteSigned” by running the following command: