param(
[string] $sid
)
$objSID = New-Object System.Security.Principal.SecurityIdentifier ( $sid )
$User = $objSID.Translate( [System.Security.Principal.NTAccount] )
$User.Value
Save that in a file (I called mine "account_from_sid.ps1"). Now, you can say "account_from_sid
No comments:
Post a Comment