Many a times we are faced with the task of getting all the members in a distribution group, especially in a large group. It is very easy with Powershell. Run the following command,
Get-DistributionGroupMember –identity “group name”
In order to select the properties we need, pipe the command to format-table with the necessary values.
Get-DistributionGroupMember –identity “group name” | ft name, primarysmtpaddress
As usual, we can export the output to a txt or csv file.
Get-DistributionGroupMember –identity “group name” | ft name, primarysmtpaddress | Export-CSV c:members.csv
http://www.howexchangeworks.com/2009/10/get-members-of-exchange-2007.html