Skip to content

Instantly share code, notes, and snippets.

@jiulongw
Created September 14, 2014 20:32
Show Gist options
  • Save jiulongw/31131dfe70bfd536525d to your computer and use it in GitHub Desktop.
Save jiulongw/31131dfe70bfd536525d to your computer and use it in GitHub Desktop.
Powershell: Get domain user SID
$objUser = New-Object System.Security.Principal.NTAccount("<domain>","<user name>")
$objUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment