In our AD, unfortunately we have several groups that contain a '/' in their names. When running the get-adprincipalgroupmembership cmdlet this causes an error if a user is a member of such a group. Is there a way to get all groups displayed that do not have the '/' character in their names?
Here's the cmdlet I've been using:
Get-ADPrincipalGroupMembership username | select name | sort name