Hi,
I have this command that gets all groups with “SiteAdmins” in the group name and selects its CN and Members:
Get-ADGroup -searchbase “DC=contoso,DC=com” -filter {name -like “SiteAdmins”} -Properties * |
Select-Object CanonicalName,Members | Format-Table -Wrap
However, on the “Members” column, I get the names on a distinguished name (DN) format:
(for example: {CN=Smith, John,OU=Delegation,DC=contoso,DC=com}).
How do I get the “Members” column to show the display name instead (Smith, John)?
Thanks in advance!