Tuesday 26 March 2013

Updating Microsoft Exchange custom attributes - LDAP vs EMC/EMS

Microsoft Exchange Server 2010 and Exchange Server 2007 include 15 extension attributes. You can use these attributes to add information about a recipient, such as an employee ID, organizational unit (OU), or some other custom value for which there isn't an existing attribute. These attributes aren't used by any Exchange components. They can be used to store Active Directory data without having to extend the Active Directory schema.

We use CustomAttribute1 to store the primary SMTP domain for the user and configure Exchange Recipient Policies to add SMTP addresses dynamically for each mailbox.

Recently we have replaced our User Creation Engine with an internally developed ASP solution (more to follow on this in a later post) and have discovered that the Recipient Policies have not been applied or refreshed.

After some investigation and testing it would appear that (and no real surprise when you think about it) when the AD attribute is edited or updated directly using LDAP Exchange Management doesn't refresh the Recipient Policies.

After more testing if we edited CustomAttribute1 using either the Exchange Management Console (EMC) or Exchange Management Shell (EMS) the Recipient Policies were refreshed. After this enlightening, but not surprising revelation we are planning to edit our User Creation Engine to use the PowerShell command in our custom RunSpace.

Set-Mailbox <Identity> -CustomAttribute1 <Value>