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

1 Flares Twitter 0 Facebook 1 Google+ 0 LinkedIn 0 Pin It Share 0 StumbleUpon 0 Filament.io 1 Flares ×

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

Join 2,300+ of your peers for daily article updates by email.

1 Flares Twitter 0 Facebook 1 Google+ 0 LinkedIn 0 Pin It Share 0 StumbleUpon 0 Filament.io 1 Flares ×

3 thoughts on “Task – Listing Members Of An Exchange 2007 Dynamic Distribution Group…

  1. 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.

    Reply

Your Thoughts?