Dynamic Distribution Group is the Exchange Server 2007 term for Query-Based Distribution Groups supported by Active Directory (and therefore Exchange Server 2003/2000) in Windows Server 2003. Unlike normal security and distribution groups, which have their membership defined by manually adding users/recipients as members, the membership of a Dynamic Distribution Group is determined every time the group receives a message. The (SMTP) Transport's Categorizer component queries a Global Catalog for a list of recipients matching the LDAP filter defined in the group.
Windows Server 2003's ADUC console allows you to preview recipients returned by the filter, by going to the group's properties and clicking Preview. However, with recipient management moved to Exchange in Exchange 2007, this ability to preview is limited to groups created using Exchange's "pre-canned" filters. If you're using a custom recipient filter (Exchange 2007 uses OPATH filters), you can't preview the recipients returned using the console.

In a previous post titled "Adventures with OPATH: some annoyances if you're used to LDAP", I talked about previewing membership using the Saved Queries feature in ADUC (the Windows 2003 version).
Later I noticed the product documentation was updated to include a way to view which recipients get picked up by the recipient filter - this is easily accomplished from the shell, using the following commands:
Windows Server 2003's ADUC console allows you to preview recipients returned by the filter, by going to the group's properties and clicking Preview. However, with recipient management moved to Exchange in Exchange 2007, this ability to preview is limited to groups created using Exchange's "pre-canned" filters. If you're using a custom recipient filter (Exchange 2007 uses OPATH filters), you can't preview the recipients returned using the console.

In a previous post titled "Adventures with OPATH: some annoyances if you're used to LDAP", I talked about previewing membership using the Saved Queries feature in ADUC (the Windows 2003 version).
Later I noticed the product documentation was updated to include a way to view which recipients get picked up by the recipient filter - this is easily accomplished from the shell, using the following commands:
$Group = Get-DynamicDistributionGroup -Identity "My Dynamic Group"
This stores the Dynamic Distribution Group in a variable called $Group. Now we can use the Get-Recipient command and filter the output using the recipient filter from the variable $GroupGet-Recipient -Filter $Group.RecipientFilter
Labels: Administration, Exchange Server 2007, Exchange Shell

Exchangepedia Blog is read by visitors from all 50 US States and 150 countries world-wide

6 Comments:
The code does not work if the dynamic distribution group is filtering on something that the -Filter parameter can't search on.
For example,
new-DynamicDistributionGroup -Name "NZ Staff" -RecipientFilter { C -eq "NZ" }
The -Filter parameter can't search on the C attribute, so the following code returns an error.
$NZ = get-DynamicDistributionGroup -Identity "NZ Staff"
get-Recipient -Filter $NZ.RecipientFilter
Cheers
Craig Beere
Same problem for me.
I can create a working DynamicDistributionGroup that includes a RecipientFilter with a RecipientType (Description -like '*Volunteer*'), but I get the following error
Get-Recipient : Cannot bind parameter 'Filter' to the target. Exception setting "Filter": ""Description" is not a recognized filterable property.
Thanks the same though,
Bob
BTW: I guess the only way to test this is to use Message Tracking found in the toolbox.
p.s. Didn't have this problem with Exchange 2003!
Bob
Craig,
My Recipientfilter is RecipientType -eq 'UserMailbox' -and CountryOrRegion -eq 'UnitedStates'
Using the above, I can view group membership when I use:
$group = Get-DynamicDistributionGroup US-Users
Get-Recipient -Filter $group.RecipientFilter
Bob,
You're right - Description is not a filterable property for RecipientFilter. Check the List of filterable properties doc for a list of which properties can be used in RecipientFilter.
I wanted to use this for our e-mail address Policies based on OU.
My queries kept returning TOO MANY results. I realized that I needed the -OrganizationalUnit parameter.
Example:
$Group = Get-DynamicDistributionGroup -Identity "AdminOU"
Get-Recipient -Filter $Group.RecipientFilter -OrganizationalUnit "Catmktg.com/Admin"
Post a Comment
Links to this post:
Create a Link
<< Home