It’s purpose with this script is for getting Quest Migration Manager (QMM) being able to match objects between domains. In a scenario with one-way trust and not being able to use Quest Migration Manager AD or any other tool for providing the SIDHistory into the AD objects. Users, mailboxes and mail contacts are already created, where the contacts are used for having a global address list (GAL) object they can send emails to. Using QMM you can match by Username, Mailaddress or SIDHistory. In my case the username differs and the SIDHistory is not available (not allowed being copied into the target AD).
I created four different functions within this script, one called “Export-SourceInformation”, which should be used in the source environment. It will export the information from the source regarding Name, DisplayName, PrimarySmtpAddress, RecipientTypeDetails and save it into a CSV file called “users.csv”. Then bring the CSV file into the target environment. This CSV file should be used as a control file if you don’t want to run all users at the same time (run some tests before running all of them in one batch). I would recommend a couple of smaller batches for testing the functions before deploying it in full scale. There is a function called “Verify-TargetInformation”, which uses the CSV file called “users.csv” and retrieves the Name and PrimarySmtpAddress for each object in the CSV file.
Another function is called “Set-SourceAddress”, this part takes care of the target account. It uses the file called “users.csv” and checks whether there are any contacts for these mailboxes, if there are the mail contact will be deleted and the mailbox forward settings will be removed together with making sure that the mailbox is showed in the GAL. But before any changes are done, the current configuration for both the mail contact and the mailbox object are being saved into a CSV file called “targetinformation.csv”.
Last but not least, the function called “Rollback-TargetInformation” is used for putting back the PrimarySmtpAddress to the value that it was prior to the change, this by using the CSV file “targetinformation.csv”. When the Directory Synchronization have successfully matched the mailboxes this function should be runned for having back the correct information.
You can use this for free, without any guarantee or warranty and at your own risk. Feel free to post about it, just make sure to link my blog and blogpost.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
This script idea came up after being involved in a migration project.
Published: 2013-05-22
Updated: 2013-05-24
Version: 1.1
It’s purpose with this script is for getting Quest Migration Manager (QMM) being able to match objects between domains. In a scenario with one-way trust and not being able to use Quest Migration Manager AD or any other tool for providing the SIDHistory into the AD objects. Users, mailboxes and mail contacts are already created, where the contacts are used for having a global address list (GAL) object they can send emails to.
Using QMM you can match by Username, Mailaddress or SIDHistory. In my case the username differs and the SIDHistory is not available (not allowed being copied into the target AD).
I created four different functions within this script, one called “Export-SourceInformation”, which should be used in the source environment. It will export the information from the source regarding Name, DisplayName, PrimarySmtpAddress, RecipientTypeDetails and save it into a CSV file called “users.csv”.
Then bring the CSV file into the target environment. This CSV file should be used as a control file if you don’t want to run all users at the same time (run some tests before running all of them in one batch).
I would recommend a couple of smaller batches for testing the functions before deploying it in full scale.
There is a function called “Verify-TargetInformation”, which uses the CSV file called “users.csv” and retrieves the Name and PrimarySmtpAddress for each object in the CSV file.
Another function is called “Set-SourceAddress”, this part takes care of the target account.
It uses the file called “users.csv” and checks whether there are any contacts for these mailboxes, if there are the mail contact will be deleted and the mailbox forward settings will be removed together with making sure that the mailbox is showed in the GAL. But before any changes are done, the current configuration for both the mail contact and the mailbox object are being saved into a CSV file called “targetinformation.csv”.
Last but not least, the function called “Rollback-TargetInformation” is used for putting back the PrimarySmtpAddress to the value that it was prior to the change, this by using the CSV file “targetinformation.csv”. When the Directory Synchronization have successfully matched the mailboxes this function should be runned for having back the correct information.
You can use this for free, without any guarantee or warranty and at your own risk.
Feel free to post about it, just make sure to link my blog and blogpost.
Download the script
Share this post
Link to post
Share on other sites