POW #2 - Upgrading legacy filters

October 2, 2008 at 2:30 PM2102

POW_BlueI just migrated from Microsoft Exchange Server 2000/2003 to Microsoft Exchange Server 2007. What is this thing with upgrading E-Mail Address Policies, Address Lists,...?

I receive this question quite often. So let's try to answer.

Exchange Server 2007 uses a new filter syntax (OPATH) to replace the traditional LDAP filters. So what is OPATH? OPATH is filtering syntax used by PowerShell, and is therefore also used by Exchange Server 2007. Remember that the whole Exchange Server 2007 administration is done via PowerShell! OPATH replaces complicated syntax used by LDAP filters in Exchange Server 2000/2003.

Which (default) filters do we need to upgrade?

  • Email Address Policies
  • Global Address Lists
  • Address Lists

Let's start with Email Address Policies. Here is LDAP Recipient Filter that comes with Exchange Server 2000/20003:

filter1

filter2

As you can see only LDAP Filter is present and Recipient Filter Type is Legacy.

How can we upgrade filter? Here is a cmdlet:

Set-EmailAddressPolicy "Default Policy" –IncludedRecipients AllRecipients

And result:

filter3

filter4

As you can see Recipient Filter is filled and Recipient Type is Precanned. Precanned means that the filter for this group was created using the pre-canned filters.

Upgrading (Default) Global Address List

Similar to Default Email Address filter only LDAP filter is present and Recipient Filter Type is Legacy.

filter5

filter6 

Upgrading cmdlet with OPATH filter:

Set-GlobalAddressList "Default Global Address List" -RecipientFilter {(Alias -ne $null -and (ObjectClass -eq 'user' -or ObjectClass -eq 'contact' -or ObjectClass -eq 'msExchSystemMailbox' -or ObjectClass -eq 'msExchDynamicDistributionList' -or ObjectClass -eq 'group' -or ObjectClass -eq 'publicFolder'))}

And result:

filter7

filter8

Recipient Filter contains OPATH filter and Recipient Filter Type is Custom, since we used custom and not pre-canned filter.

Upgrading (Default) Address Lists

Notice that Default Address Lists in Exchange 2000/2003 are All Users, All Groups, All Contacts and Public Folders. All Address Lists contains only LDAP Filter and Recipient Type is Legacy.

filter9

filter11

filter12

filter13

filter10

Upgrading cmdlets with OPATH filter:

Set-AddressList "All Users" –IncludedRecipients MailboxUsers

Set-AddressList "All Contacts" –IncludedRecipients MailContacts

Set-AddressList "All Groups" –IncludedRecipients MailGroups

Set-AddressList "Public Folders" –RecipientFilter { RecipientType -eq 'PublicFolder' }

And results:

filter14

filter15

filter16

filter17

filter18

filter19

Notice that all filters are upgraded to OPATH filter format. Filters for All Users, All Groups and All Contacts were created using pre-canned filters and Public Folders with custom Recipient Filter.

This part covers converting Default Filters from LDAP to OPATH filter format. If you are using custom Email Address Lists, Global Address Lists or Address Lists please consider upgrading LDAP filters to OPATH.

Posted in: POW

Tags: