Convert Exchange 2003 Email Address book Policies to Exchange 2010 Email Address book polices

Posted by robd on May 24, 2017
exchange, exchange 2010

If you ever get this annoying message when opening an Email Address book policy:

The specified e-mail address policy couldn't be edited. E-mail address polices created with legacy versions of Exchange must be upgraded using the 'Set-EmailAddressPolicy' task, with the Exchange 2010 Recipient Filter specified.

This means the policies were created with old versions of Exchange, in my case Exchange 2003, you can find them all, looking for the word Legacy:

Get-EmailAddressPolicy | Select Identity, RecipientFilterType, RecipientFilter, LDAPRecipientFilter | FL

As you can this will show the ldap query too, the problem is if you run the Set-EmailAddressPolicy against this then you’ll break it, all custom filters (LDAP queries) will be reset to “mailnickname=*” which can result significant email outages.

So how to fix it.

Download this PS script:

Choose a policy to convert, copy the query from above and run the following:

.\ConvertFrom-LdapFilter.ps1 "(&(mailNickname=*)(objectCategory=person)(objectClass=user)(objectClass=user)(objectCategory=person)(mailNickname=*)(msExchHomeServerName=*)(objectCategory=user)("

So now we have this:

( ( Alias -ne $null ) -and ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq'user' ) -and ( ObjectClass -eq 'user' ) -and ( ObjectCategory -like 'person' ) -and ( Alias -ne $null ) -and ( ServerLegacyDN -ne $null ) -and ( ObjectCategory -like 'user' ) -and ( WindowsEmailAddress -eq '' ) )

Now finially lets run the Set-EmailAddressPolicy (NOTE THE {} at the beginning and end, not a ” :

Set-EmailAddressPolicy -Identity "migrate-test" -RecipientFilter {( ( ( Alias -ne $null ) -and ( ( ObjectCategory -like 'person' ) -and ( ObjectClass -eq 'user' ) -and ( recipientType-eq 'UserMailbox' ) ) ) -and ( ObjectCategory -like 'user' ) -and ( WindowsEmailAddress -eq '' ) )

Done, F5 it in Exchange console and see if you can open it!!

Tags: , ,

2 Comments to Convert Exchange 2003 Email Address book Policies to Exchange 2010 Email Address book polices

  • Skype has launched its web-based customer beta for the world, soon after introducing it broadly
    inside the U.S. and U.K. before this four weeks. Skype for Website also now can handle
    Chromebook and Linux for instant online messaging interaction (no voice and video yet, those call for a
    connect-in installing).

    The expansion of the beta brings support for an extended listing of dialects to assist
    strengthen that global user friendliness

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.