HMC tips for Exchange: Part 3 - Fixing GAL issues

It’s an unfortunate problem that the GAL integration isn’t rock-solid with HMC and Exchange, and that it’s merely controlled by AD schema attributes (see The Zen of Hosting: Part 5 – HMC and Exchange for more info). It’s very easy for this to be messed up by a number of things. Most common for me is the use of Exchange PowerShell, which seems to reset that attribute with many of its commands. The easiest way to resolve it is with another XML request passed to provtest, in this case the nicely named RepairExchangeObject. Basically, it just needs the domain controller and the LDAP path to the user whose attributes have been screwed—and off it goes and fixes it.

NOTE: This is for HMC 4.0. HMC 4.5 has a different structure completely. Check the SDK for the message, which will give you a sample you can use.

The request looks like this:

<request>
    <data>
        <preferredDomainController>Domain Controller</preferredDomainController>
        <path>LDAP Path</path>
    </data>
    <procedure>
        <execute namespace="Exchange 2007 Provider" procedure="RepairExchangeObject" impersonate="1">
            <before source="data" destination="executeData" mode="merge" />
            <after source="executeData" destination="data" mode="merge" />
        </execute>
    </procedure>
</request>

Sample:

<request>
    <data>
        <preferredDomainController>srv01</preferredDomainController>
        <path>LDAP://CN=frank@test.com,OU=MyCustomer,OU=MyReseller,OU=Hosting,DC=litware,DC=local</path>
    </data>
    <procedure>
        <execute namespace="Exchange 2007 Provider" procedure="RepairExchangeObject" impersonate="1">
            <before source="data" destination="executeData" mode="merge" />
            <after source="executeData" destination="data" mode="merge" />
        </execute>
    </procedure>
</request>