Scripting ADMT from the command line

ADMT from the command line has a ton of options, but it does make it nicer if you need to script migrations or just want to run thru things quickly. It also helps tremendously that ADMT 3.2 has a bug that you can NOT use an include file when you want to ADMT groups. So you either have to specify them all manually or use it from the command line.

Which introduces yet another bug that you can NOT ADMT over sidHistory unless you have ADMT installed on a domain controller. In most environments putting ADMT on a DC would violate several standards and isn’t really a good practice. BUT if you need to script your ADMT group migrations and want sidHistory, you have to do it on a DC, so there you go.

But if you want do an ADMT group migration from the command line you can type admt group /? to get an example of all the things you can set. You can also build an options file and specify that in your command as well. Either way works fine, although if you’re going to be migrating something repeatedly an options file might be the best way to go.

One thing I’d like to note here is that I’ve also set my ADMT to NOT exclude any attributes, following the guide here: http://support.microsoft.com/kb/937537

So when you ADMT a group, unless you exclude the Exchange attributes, it WILL migrate it as a DL. However, that DL will still be stamped with the old version of Exchange to fix that after you migrate the groups, run this command:

</pre>
get-distributiongroup –resultsize unlimited|set-distributiongroup –forceupgrade
<pre>

Once you do that, make sure you exclude the exchange attributes the next time you migrate or you’ll have to do it all over again!

Let me give the command I’m using here and then we’ll deconstruct here:

admt group /SD:"sourcedomain.com" /TD:"targetdomain.com" /TO:"Staging/AMER" /UGR:YES /FGM:Yes /CO:MERGE /gx homeMTA,mailnickname,msExch*,msRTCSIP*,msSFU*,proxyAddresses,showInAddressBook,targetAddress /UMO:YES /F:"d:\migration\groupout.txt"

  • /SD <== Sourcedomain FQDN
  • /TD <== Targetdomain FQDN
  • /TO <== Target OU. This one is a little tricky. It doesn’t want the CN or DN. It wants the OU structure from the root. So if your domain is targetdomain.com and off the root you have an OU called Staging and have another OU under that called AMER, you would use Staging/AMER here
  • /UGR <== Update Group Rights
  • /FGM <== Fix Group membership. This is the important one if you want to make sure that DL’s and groups are updated with the appropriate members
  • /CO <== Conflict Options
  • /UMO <== Update Previously Migrated Objects
  • /F <== Include file
  • /GX <== Exclude Exchange/LYNC/NIS related attributes

Then just script and execute and you’re done!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s