Bug in Get-AdGroupMember

This topic contains 4 replies, has 3 voices, and was last updated by Profile photo of Michael Jacobsen Michael Jacobsen 3 months, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #40848
    Profile photo of Michael Jacobsen
    Michael Jacobsen
    Participant

    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?

    #40925
    Profile photo of TomBaker
    TomBaker
    Participant

    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

    #40957
    Profile photo of Edmond Yee
    Edmond Yee
    Participant

    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

    #41045
    Profile photo of Michael Jacobsen
    Michael Jacobsen
    Participant

    @ 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)
                }
           }
      }
    
    #41048
    Profile photo of Michael Jacobsen
    Michael Jacobsen
    Participant

    @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?

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.