List of members in Groups AD

Hi Experts,

Our exchange server is now offline and we require a script to pull all object names (distribution groups) and list the name of the members.

I have done this script when exchange was working however as its offline I am unable to do this command.

Is there anything you can provide to help retrieve this result into a CSV.


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will SzymkowskiSenior Solution ArchitectCommented:
You can use the Get-ADGroup cmdlet filtering on GroupCategory Distribution. See the below script.
Import-module activedirectory
$FindGroups = Get-ADGroup -Filter { GroupCategory -eq "Distribution" }

ForEach ($Group in $FindGroups) 


            Get-ADGroupMember -Identity $Group | ft $Group.Name, Name |
            Out-File "c:\GroupMembers.csv" -Append


Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David Johnson, CD, MVPOwnerCommented:
he wants exchange groups and can't be done with the exchange server down.
introluxAuthor Commented:

This script seems to pull all groups, I can possibly go through this list and remove groups that I know are not distribution groups.

Is there a method to produce the result as:

Name of member, group name


introluxAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.