Bug in Get-AdGroupMember

Is there an official bug in Get-AdGroupMember?

If you use this commandlet on a group which contains members from a diffrent domain it throws an error.

Is this a bug? and if so will MS fix it?

I think you be be interested in this thread that i found by google searching your problem.
It discusses the problem at length and has a work around.

https://social.technet.microsoft.com/Forums/scriptcenter/en-US/07e7595a-9e7d-43ed-a147-c8591adb1fb2/advice-with-getadgroupmember?forum=ITCG

I just ran Get-ADGroupMember on a group in my child domain that contains computers from both the child and parent domain with no errors. Maybe it is an issue with an older version of PowerShell? I am running 5.0 RTM

@ TomBaker
Thanks for the reply,

My main problem is with the commandled not working. I already have my own work around, but the correct way would be to use the commandled. I just want to know if MS is aware of the bug and if they are going to fix it.

This is my work around:

 
   $members= (Get-ADGroup -Identity $groupSID -Properties members).members
   if ($members) {
        foreach ($member in $members)
        {
            if ($member.contains("ForeignSecurityPrincipals")) {
                    $pos = $member.IndexOf(",")
                    [string] $memberSID = $member.substring(3,$pos - 3)
            }
       }
  }

@Edmond Yee
Thanks for the reply,

Im running it under v.4, I havn’t tried it under v.5 yet, it might have been updated in v5?