Tip: Use a cmdlet to Create Dynamic Distribution Groups

Follow Our Daily Tips

Twitter | Blog | RSS | Facebook

With dynamic distribution groups, group membership is determined by the results of an LDAP query.

You can create a dynamic distribution group and define the query parameters using the New-DynamicDistributionGroup cmdlet in the Exchange Management Shell.

Here’s an overview of the syntax and usage for this cmdlet.


New-DynamicDistributionGroup -Name ExchangeName 
-IncludedRecipients <None, UserMail, MailContacts, MailGroups, Resources, 
AllRecipients> [-Alias ExchangeAlias] 
[-DisplayName DisplayName] [-OrganizationalUnit OUName] 
[-ConditionalCompany CompanyNameFilter1, CompanyNameFilter2,...] 
[-ConditionalCustomAttributeX Value1, Value2,...] 
[-ConditionalDepartment DeptNameFilter1, DeptNameFilter2, ... ] 
[-ConditionalStateOrProvince StateNameFilter1, StateNameFilter2, ...] 
[-RecipientContainer ApplyFilterContainer] {AddtlParams} 

New-DynamicDistributionGroup -Name ExchangeName -RecipientFilter Filter 
[-Alias ExchangeAlias] [-DisplayName DisplayName] [-OrganizationalUnit OUName] 
[-RecipientContainer ApplyFilterContainer] {AddtlParams} 

[-ArbitrationMailbox ModeratorMailbox] [-DomainController FullyQualifiedName] 
[-ModeratedBy Moderators] [-ModerationEnabled <$true | $false>] 
[-Organization OrgName] [-PrimarySmtpAddress SmtpAddress] 
[-SendModerationNotifications <Never | Internal | Always>]


New-DynamicDistributionGroup -Name 'CrossSales' 
    -OrganizationalUnit 'cpandl.com/Users' -DisplayName 'CrossSales' 
    -Alias 'CrossSales' -IncludedRecipients 'UserMail, MailContacts, MailGroups' 
    -ConditionalCompany 'City Power and Light' 
    -ConditionalDepartment 'Sales','Marketing' 
    -ConditionalStateOrProvince 'Washington','Oregon','California' 
    -RecipientContainer 'cpandl.com'

From the Microsoft Press book Microsoft Exchange Server 2010 Administrator’s Pocket Consultant by William R. Stanek.

Looking for More Tips?

For more tips on Exchange Server and other Microsoft technologies, visit the TechNet Magazine Tips library.