Pages

Tuesday 10 August 2010

How To Manage Address List Content

Creating Address Lists


The following cmdlet will show you how to create an address list based on certain Active Directory attributes:

[PS] New-AddressList -Name "The Training Department" -IncludedRecipients MailboxUsers -ConditionalDepartment Training 

The 'conditionaldepartment' attribute is based on a number of different AD attributes. Some of them are shown below:

1. Company
2. Department
3. State or province

Just include 'conditional' in front of these attributes as shown in the above cmdlet.


You can create an address list using custom filters rather that relying on the predefined AD attributes. This makes creating building address lists fun! For example, if you wanted to create an address list which defines usermailbox recipients that have a surname which starts with the letter 'A' try typing the following cmdlet:

[PS] New-AddressList -Name "Trainers Starting with A" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (Lastname -like 'A*'))}


You can update this address list by typing the following cmdlet:

[PS] Update-AddressList -Identity "Trainers Starting with A"


Who Can View the Address List Created


Now the address list has been created you can customize who can view the address list. By default all users can see the list but you can change this if you want. For example, considering the above address list you can only members of the Training Department to view 'Trainers Starting with A'. To do this use the following two cmdlets:

1. Remove the permission that allows all authenticated users to view the address list

[PS] Remove-ADPermission "Trainers Starting with A" -User "Authenticated Users" -ExtendedRights "Open Address List" -Confirm:$false


2. Define which security group can view the address list

[PS] Add-ADPermission "Trainers Starting with A" -User "Training Department" -ExtendedRights "Open Address List" -Confirm:$false


The above "Training Department" is a security group. If you want to view the membership of an address list try typing the following cmdlet:

[PS] Get-AddressList "Trainers Starting with A"



No comments:

Post a Comment