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

Share & Comment

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


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


Share & Comment
Subscribe for Updates
Never miss a blog post again
About the author: UC Architect, Blogger, Husband & Dad. I have been in IT for the last 12 years, with Exchange Server becoming the prime area in the last few years. I am active on Experts Exchange & TechNet forums and I am a technical author for SearchExchange.

3 comments… add one

  1. Ed

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

    1. Rajith Enchiparambil

      Thanks Ed.

  2. Mark Giemza

    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.

Leave a Comment