If you just upgraded Exchange to 2010, and still using the ILM 2007. you need install the SP1 and featured package, the only document you can follow is http://technet.microsoft.com/en-us/magazine/ff472471.aspx
Basically, for the provisioning to exchange 2010 mailbox. you have call the utility to create a mailbox in your Povision DLL.something like,
void IMVSynchronization.Provision (MVEntry mventry) { ConnectedMA adMA; CSEntry csentry; String nickName, mailboxMDB; ReferenceValue dn; try { adMA = mventry.ConnectedMAs["Fabrikam AD MA"]; nickName = mventry["mailNickname"].Value; mailboxMDB = mventry["homeMDB"].Value; // Construct the distinguished name dn = adMA.EscapeDNComponent("CN=" + mventry["cn"].Value).Concat("ou=mailboxes,dc=fabrikam,dc=com"); if(0 == adMA.Connectors.Count) { csentry = ExchangeUtils.CreateMailbox(adMA, dn, nickName, mailboxMDB); } } // Handle any exceptions catch(Exception ex) { //... } } |
For the Magic code in CreateMailBox, you can see the source code. it basically add several attributes there,
After that, also you should config the AD ma to run the extension Code , you need to specify the Powershell remote address, and Extension of 2010 or 2007 ,
After those two major change been applied, the ILM will call the provision code to create the mailbox, and Run the Extension Code for every object listed in the pending export stage of the Connected Space. there are two Extension DLLs in the ILM Extension Folder.
Extension2007 and Extension2010.dll
for the code in Exch20xxExtension.dll, it basically call the powershell command remotly on the server you specified in the RPS URI.
basically, call the PowerShell command remotely.
Update-Recipient -Identity "<ExportedDN>"-Credential <PSCredential> -DomainController <Fqdn> |
Here is the pain you may have.
ILM will call this command for every Object which has some pending export in the MA. even just a title change, it will call the Update-receipent , which may cause the default mailpolicy to run. (in some case, this is not what you want, i.e you have different mail policy. )
however, we have the Extension point.
you can get the source code of the extension dll, put you logic there, and sign the new dll. which will be picked up by ILM.
you can do some loggin there, or check wheter the object is required to run the update-recepient command. or even just call you powershell command.