Created
May 16, 2017 20:26
-
-
Save powercode/c139df10b04bb10e2d996ff6a95ad8c0 to your computer and use it in GitHub Desktop.
Convert sid to nt account
This file contains hidden or 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
using namespace System.Security.Principal | |
function ConvertFrom-SID { | |
[CmdletBinding()] | |
[OutputType([NTAccount])] | |
param([SecurityIdentifier[]] $SID) | |
$SID.Foreach{$_.Translate([NTAccount])} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment