This Powershell code snippet easily displays the SID of a Windows Security Principal:
1 2 3 | $principal = New-Object System.Security.Principal.NTAccount("builtin\Administrators") $principalSID = $principal.Translate([System.Security.Principal.SecurityIdentifier]).Value $principalSID |