How to create Dynamic Distribution Groups in Exchange Server 2010

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

We can create a distribution groups by using Cmdlets as shown below: 

 

Syntax:  

New-DynamicDistributionGroup -Name ExchangeName  

IncludedRecipients <None, UserMailMailContactsMailGroups, 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 

{AddtlParams 

[-ArbitrationMailbox ModeratorMailbox] [-DomainController FullyQualifiedName 

[-ModeratedBy Moderators] [-ModerationEnabled <$true | $false>]  

[-Organization OrgName] [-PrimarySmtpAddress SmtpAddress 

[-SendModerationNotifications <Never | Internal | Always>]  

 

Example: 

New-DynamicDistributionGroup -Name ‘TechSales‘  

OrganizationalUnit ‘techpeoples.net/Users’ –DisplayName ‘Trenovision‘  

-Alias ‘Trenovision‘ –IncludedRecipients ‘UserMailMailContactsMailGroups‘  

ConditionalCompany ‘City Power and Light’  

ConditionalDepartment ‘Technologies’,’Learning‘  

ConditionalStateOrProvince ‘Oregon’,’California‘, ‘Washington’ 

RecipientContainer ‘Trenovision.com’