I have a new admin on our team, and she is having some permissions issues. Some things the new admin runs in Exchange PowerShell are giving weird errors that the rest of the team doesn't get, and google doesn't help with figuring out what those errors mean. So we figure it must be a permissions issue. In my investigation, I ran a query of the new admin's group membership, and then I wanted to compare it against mine. Everything seemed to work, however, I noticed the compare-object command didn't find all the differences when I spot checked the results.
Here is what I ran:
$a = Get-ADPrincipalGroupMembership "me" | select name
$b = Get-ADPrincipalGroupMembership "new admin" | select name
Compare-Object $a $b | ft -AutoSize
It listed about 7 results, but right away I noticed that I was in one group that started with an "A" and she wasn't in that group, and it was not listed in the results. Any suggestions?
| Select -ExpandProperty Nameand see if that works better for you-Propertyparameter ofcompare-objectwould also work