The available properties of Get-ADSIPrincipalGroupMembership is only name and description.
At the very least, DistinguishedName should be available as well as that's what's listed in the memberOf properties of AD Principals.
I.e. to get memberOf for a computer
((Get-ADSIComputer $Env:ComputerName).GetUnderlyingObject()).memberOf
If a lokup is done to find out properties, other good to have properties are
- Sid
- SamAccountName
- DisplayName
- Guid
- UserPrincipalName
Why not include the actual Object alltogether?
That way you can also tell what kind of Principal object we are dealing with.
The available properties of
Get-ADSIPrincipalGroupMembershipis onlynameanddescription.At the very least,
DistinguishedNameshould be available as well as that's what's listed in the memberOf properties of AD Principals.I.e. to get memberOf for a computer
If a lokup is done to find out properties, other good to have properties are
Why not include the actual Object alltogether?
That way you can also tell what kind of Principal object we are dealing with.