The Network Manager at Westminster School presents solutions to sticky problems...

Tuesday, 3 March 2009

Exchange 2007, the GAL and Custom Address Lists

Exchange 2007 has new ways of approaching Address Lists. As a consequence, you may have address lists created in previous versions of Exchange that now seem imutable and not upgradeable. The Console returns with a most helpfull message advising you to use the -ForceUpgrade option. Rather than the LDAP filters used by previous implementation, Exchange 2007 now uses the OPath format.

As with many of the more complex tasks we must ditch the moderately functional Exchange Management Console and use the Exchange Management Shell. As a tip when working with any shell, I recomend that you use Notepad to create your command strings (which can get very long) and then cut and paste them into your shell window.

To create a new Address List you need to use the add-addresslist cmdlet. An exaple of this is:

new-addresslist -Identity Name -Container "\Parent Container Name" -RecipientFilter { ( ( property -eq 'value' ) -and ( property -like 'value' ) ) }

If you are looking at the list of address lists in Exchange Management Console, you will understand the properties above. To amend the filter afterwards use the set-addresslist cmdlet:

set-addresslist -Identity Name -RecipientFilter { ( ( property -eq 'value' ) -or ( property -like 'value' ) ) }

These property values are not the LDAP or AD equivalents, so you need to check http://technet.microsoft.com/en-us/library/bb738157.aspx for the appropriate property you are filtering against (for sp1.) If you are amending an existing pre-2007 address list, then here is where we use the -ForceUpgrade option:

set-addresslist -Identity Name -RecipientFilter { ( ( property -eq 'value' ) ) } -ForceUpgrade

If you do not include a new filter, but just the -ForceUpgrade switch, nothing happens and the filter remains in the old format.

You can create an Address List in the Console and then edit it using the Shell, but there is a gotcha: The address list must not use any of the standard filters. If they do, adding a Recipient Filter in the Shell will fail. So when you create the Address List, select the 'None' radio button in the "include these recipient types." Better still, skip the Console altogether. Typing into a shell is becoming a lost art. Be part of the revival...

Finally, Exchange 2007 sp1 still appears to have issues with the Default Global Address List. In our CCR implementation, updates to the GAL still do not occur at the scheduled times. Consequently we have to manually update the GAL every time we make an amendment. This is simply:

update-addresslist -Identity "Default Global Address List"

Job done!

No comments:

Post a Comment