Creating DynamicDistributionGroup with -RecipientFilter

As any Exchange 2007 administrator knows, you get best features by using PowerShell.

In old version of Exchange (e.g. Exchange 2003), you could create dynamic distribution group where the members of the group would be users from specific Exchange server or Exchange Mailbox Store. This was very useful especially during migration since it was very easy to notify all the users in the store that their mailboxes will be moved over the night. One would only have to create a dynamic group with appropriate filter.

If you want to create dynamic group on Exchange 2007 you have very limited filters available in GUI.


To get the same results as we did on Exchange 2003 we need to use the PowerShell. The command we need to use is:

New-DynamicDistributionGroup –Name "All Users on Server Exchange" –Alias "AllonExchange" –RecipientFilter {(ServerName –eq "Exchange")}

This will actually create new dynamic distribution group named "All Users on Server Exchange" and users will be filtered by "ServerName".

If you open the dynamic group we just created in GUI you can notice it has an additional tab where you can check the filter that we created in PowerShell.


There are a lot of properties we can filter by. ServerName is just one of them. To get complete list of the properties check the Filterable Properties for the -RecipientFilter Parameter in Exchange 2007 SP1 and SP2.

Add comment