Checking for mail switch in QMM

How do I know when QMM has switched my mailbox?

In a Migration Manager for Exchange (QMM/EX) migration there are three ways to check for a switched mailbox.  You can query AD, you can query the QMM project in ADAM, and you can check for the hidden “switch” message in the mailbox itself.

Update 2013-12-16:  Added Checking ADAM and the mailbox via MAPI.

 

Checking AD

You can check from the target side by doing a custom search in LDAP:

(&(objectClass=user)(objectCategory=person)(!(targetAddress=*))(homeMDB=*)(extensionAttribute15=*))

Of course, extensionAttribute15 is the default “matching” attribute, so be sure to change that to the actual attribute you selected.

Or, change it a bit, and you can check in the source instead:

(&(objectClass=user)(objectCategory=person)(targetAddress=*)(homeMDB=*))

This is a quick and easy one to use.  Some day I will pop this into a quick exe with a gui, but for now ADUC will do the trick.

 

Checking the AD LDS project

Or you can try checking in the Active Directory Lightweight Directory Services (AD LDS, formerly known as ADAM) project.  You could go about this in a variety of ways using tools like csvde, ldifde, vs script, powershell, ldp and of course ADSIEdit.  Regardless of which approach the LDAP query you will build will look similar.

QMM uses its own object types in AD LDS, and the object type that represents a user pair is called an ObjectPair.  This specialized object has specialized fields.  We will be using these specialized fields in our Query.

To connect to the project in AD LDS you need to know the project name.  Usually I name mine QMM (it makes life easy if I name all the database files ‘QMM’, so I do).  Once you have that you can launch ADSI Edit, right click at the top of the tree and choose “Connect To…”.  Assuming you are on the sever where your AD LDS project is housed your screen will look as depicted below (highlighting provided by me).

b2ap3_thumbnail_ADSIEdit-to-ADLDS

Once connected to the AD LDS project, right click on the root of the new connection, select New, then Query.  You can then build a query that looks like this:

To find all the switched users you can write a query like this:

(Aelita-Amm-IsSwitched=TRUE)

Of course using ADSIEdit this way doesn’t display any useful data on the screen as it is all GUIDs – you will have to go to properties of the objects to see the values of Aelita-AMM-SourceSamAccountName to know who you are looking.  It is a bit easier to look at this data through scripting if you want to generate a user friendly.

 

Checking the Mailbox

The last option I know of is to check the mailbox itself for the hidden “switch message” that QMM posts (and that tools like the Client Profile Updating Utility (CPUU) look for.  I am not going to post the code here, but I will tell you that the message is in the Alternate Contents table in the Inbox, and it has a subject line that starts with “[EMW”.  If that isn’t enough of a hint, or if you want us to write some custom code for you to check the switch status this way (great for checking AutoDiscover needs), then drop us a line.

 

Need to brush up on your LDAP skills?  I have been going to this site for basic LDAP for a while:

https://www.petri.co.il/ldap_search_samples_for_windows_2003_and_exchange.htm#

There are many others, but this one has enough quick examples of useful tasks to make it worth keeping around.