Quick Tip: Resolving an SID to a AccountName

Published on Saturday, June 22, 2013 in

When trying to avoid the usage of temporary profiles (see: Setspn: Temporary Profiles and IIS Application Pool Identities) I had to resolve some SIDs (Security Identifiers) to AccountNames. Using PowerShell this can easily be achieved:

  • $objSID = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-21-xxxxxxxxx-yyyyyyyyyy-zzzzzzzzz-10472");
  • $objUser = $objSID.Translate( [System.Security.Principal.NTAccount]);
  • $objUser.Value

Happy resolving!

Related Posts

No Response to "Quick Tip: Resolving an SID to a AccountName"

Add Your Comment