Pages

Tuesday 20 July 2010

Manage Distribution Groups

Messages can be sent to groups of recipients. These groups are called distribution groups. The following describes

1. How to create a new distribution group
2. How to mail enable an existing distribution group
3. How to modify the membership of the group

How to Create a New Distribution Group

An important initial consideration is that when you create a distribution group the group scope is universal and they can be security enabled (and can be assigned to an acl). When you create the group you decide this.
The following cmdlet will show you how to create a distribution group that is security enabled.


[PS] New-DistributionGroup "Sales" -Security

If the -Security parameter is left out then the group defaults to a distribution group.

How to Mail Enable an Existing Distribution Group

If you recall three different group scopes exist

1. Global
2. Domain local
3. Universal


You should understand that you can only mail enable existing universal groups (domain local and global groups have to be converted).

The following cmdlet will mail enable an existing universal group called HR

[PS] Enable-DistributionGroup "HR"

How to Modify the Membership of the Group

The following cmdlets will add and remove members from the distribution group called "HR"

[PS] Add-DistributionGroupMember "HR" -Member "Andrew Stevens"

[PS] Remove-DistributionGroupMember "HR" -Member "Andrew Stevens"

Dynamic Distribution Groups

In Exchange 2000/2003 these were called query based distribution groups. Membership is based on a recipient filter and can include all recipient types. By default these groups types only accept messages from authenticated users. Membership can change based on a particular attribute. For example, a recipient can be a member of DDG based on a department. The following example will create a DDG called 'students' and will include users that have mailboxes AND are in the students department.

[PS] New-DynamicDistributionGroup -Name "Students" -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (Department -like 'Students*')}

To view the DDG type the following cmdlet

[PS] Get-DynamicDistributionGroup

To view the DDG membership, type the following cmdlet:

[PS]  $Group = Get-DynamicDistributionGroup -Identity "Students"
[PS] Get-Recipient -RecipientPreviewFilter $Group.RecipientFilter


 















No comments:

Post a Comment