Created
October 23, 2014 13:53
-
-
Save HarmJ0y/57f1dac93fcc3564f9b3 to your computer and use it in GitHub Desktop.
domain user to sid and sid to user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# user to SID | |
(New-Object System.Security.Principal.NTAccount("DOMAIN","USER")).Translate([System.Security.Principal.SecurityIdentifier]).Value | |
# SID to user | |
(New-Object System.Security.Principal.SecurityIdentifier("SID")).Translate( [System.Security.Principal.NTAccount]).Value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment