unable to get the Group Members data (More Than 5000) from a group in AD

Welcome Forums General PowerShell Q&A unable to get the Group Members data (More Than 5000) from a group in AD

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
3 weeks, 1 day ago.

  • Author
    Posts
  • #158258

    Participant
    Topics: 3
    Replies: 4
    Points: 43
    Rank: Member

    i am trying to export the members from a security group & members are more than 5000 getting the error "Get-ADGroupMember : An unspecified error has occurred"

     

    can any you please suggest how to overcome this issue.

  • #158264

    Participant
    Topics: 0
    Replies: 35
    Points: 354
    Helping Hand
    Rank: Contributor

    Get-ADGroupMember cannot retrieve more than 5000 users – it's a limit of ADWS. You can easily workaround it however:

    (Get-ADGroup -Identity GroupName -Properties Members).Members
    

    Technically the limit can be increased, but you'd have to modify it on each domain controller, and is in general just not recommended.

You must be logged in to reply to this topic.