Gets domain, name, type, and SID information about a user or group.
Resolve-Identity [-Name] <String> [<CommonParameters>]
Resolve-Identity -SID <Object> [<CommonParameters>]
Resolve-Identity function takes an identity name or security identifier (SID) and gets its canonical representation. It returns a
Carbon.Identity object, which contains the following information about the identity:
The common name for an account is not always the canonical name used by the operating system. For example, the local Administrators group is actually called BUILTIN\Administrators. This function uses the
LookupAccountSid Windows functions to resolve an account name or security identifier into its domain, name, full name, SID, and SID type.
You may pass a
System.Security.Principal.SecurityIdentifer, a SID in SDDL form (as a string), or a SID in binary form (a byte array) as the value to the
SID parameter. You'll get an error and nothing returned if the SDDL or byte array SID are invalid.
If the name or security identifier doesn't represent an actual user or group, an error is written and nothing is returned.
|Name||Type||Description||Required?||Pipeline Input||Default Value|
The name of the identity to return.
The SID of the identity to return. Accepts a SID in SDDL form as a
Resolve-Identity -Name 'Administrators'
Returns an object representing the
Resolve-Identity -SID 'S-1-5-21-2678556459-1010642102-471947008-1017'
Demonstrates how to use a SID in SDDL form to convert a SID into an identity.
Resolve-Identity -SID (New-Object 'Security.Principal.SecurityIdentifier' 'S-1-5-21-2678556459-1010642102-471947008-1017')
Demonstrates that you can pass a
SecurityIdentifier object as the value of the SID parameter.
Resolve-Identity -SID $sidBytes
Demonstrates that you can use a byte array that represents a SID as the value of the