Remembering homeMDB & msExchHomeServerName when disabling for later reconnecting

Hi,

My environment requires me to be able to create Exchange mailboxes on existing users, disable those mailboxes and then, some time later, re-enable them and have Exchange reconnect them automatically all driven from some Metaverse attributes.

I have code in MapAttributesForExport which performs this "provisioning" and "deprovisioning" of mailboxes which is working fine. Basically this:

If mventry("mailenabled")

If csentry("homeMDB").isPresent Then csentry("homeMDB") = inventHomeMDB()

End If

Else csentry("homeMDB").delete End If

inventHomeMDB() takes a list of databases and assigns one at random. Then equivalents for msExchHomeServerName and mailNickname.

When it then comes to reprovisioning, I need to be able to recall what homeMDB was set to when the deprovision occurred (as it may have been changed in Exchange by a Move-Mailbox).

I have tried flowing homeMDB back into the MV with a catch in a rules extension to not flow an empty value but this doesn't work because the code is never run when the attribute is Deleted.

I have thought about keeping a small SQL table with the "last known values" in (kept up to date in an IAF rule) which could be checked before calling inventHomeMDB() but this seems rather inelegant.

Any ideas? Thanks!

foo



June 9th, 2015 12:36pm

How are you assigning homeMDB to begin with?

When certain conditions are met, I make one up based on available databases. I had intended to then flow homeMDB back to the MV with a IAF -- this works fine -- which I would catch with another MapAttributesForImport rule:

If csObject._homeMDB.IsPresent Then
    mvObject._homeMDB.StringValue = csObject._homeMDB_asString
    ' Else don't do anything
End If

But when homeMDB is deleted from AD, FIM just deletes the MV attribute without calling this code even though it's an "Advanced" flow.

I was hoping to be able to use this when the conditional was satisfied again to repopulate homeMDB with the previous value while also allowing Exchange admins to move the mailbox between databases safely.

Free Windows Admin Tool Kit Click here and download it now
June 10th, 2015 3:33am

You want to set this just once, so add a check to see if MV has been set.

If ! mvObject._homeMDB.StringValue.IsPresent Then

if csObject._homeMDB_asString.IsPresent     

mvObject._homeMDB.StringValue = csObject._homeMDB_asString


    End if
End If

June 10th, 2015 9:04am

I have solved this myself by using the Manual Precedence setting in the Metaverse Designer which allows you to do the whole logic in the Rules Extension. There are caveats with using this technique.


  • Marked as answer by Matthew Slowe Wednesday, June 17, 2015 2:09 PM
  • Edited by Matthew Slowe Wednesday, June 17, 2015 2:09 PM missed leading "I"
Free Windows Admin Tool Kit Click here and download it now
June 17th, 2015 2:09pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics