Task – Listing Members Of An Exchange 2007 Dynamic Distribution Group…

As exchange admins, we might come across a scenario where we need a list of all users in a dynamic distribution group. Most companies will have an “All Staff” dynamic group filtering users based on a selected criteria ( users with mailboxes for example). Larger companies will have dymanic groups based on department, organizational unit etc.

Though it is easy to view the members of the group in exchange management console using the “preview” functionality, things become hard if you want a csv file which lists all the members, either for reporting or troubleshooting purposes.

With powershell, our life becomes easy. Let me explain with an example. I have a dynamic distribution group named “All Staff” and want to list the members of it in a text file. Run the following command to get the list in shell,

$group = Get-DynamicDistributionGroup –identity “AllStaff”

Get-Recipient –RecipientPreviewFilter $group.RecipientFilter

10

In order to export the result to a text file, run

$group = Get-DynamicDistributionGroup –identity “AllStaff”

Get-Recipient –RecipientPreviewFilter $group.RecipientFilter | Out-File c:allstaff.txt

11

SUBSCRIBE FOR DAILY ARTICLE UPDATES VIA EMAIL
Get the published articles delivered straight to your inbox. Your details will not be passed to any third party company.

Exchange Architect, Blogger, Husband & Dad. I have been in IT for the last 11 years, with Exchange Server becoming the prime area in the last few years. I am active on TechNet forums & Experts Exchange.

View all contributions by

3 comments… add one

  • Ed August 16, 2012 at 9:58 pm

    Thanks for the concise info… if only there were more useful searchable attributes.

    Reply edit
  • Mark Giemza August 17, 2012 at 8:48 am

    Any particular reason you can think of as to why this command returns all User Mailboxes in my organization and not just the User Mailboxes in the group? Currently, when the group is selected in Microsoft Outlook the group will send an email to all members of one particular Organizational Unit.

    Reply edit

Speak Your Mind…

Website Hits