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

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.

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

[pre]
(Get-ADGroup -Identity GroupName -Properties Members).Members
[/pre]

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