MDT 2010: User State Migration

In order to automate the User State Capture and Restore task sequence steps in MDT 2010 you will need to configure your deployment share so it knows where to store the data. MDT 2010 installs the User State Migration Tool for usage prior to capture and restore tasks.

If you’re currently using Windows Easy transfer to migrate user settings and files during deployments then this post will help you to advance to the next level using the User State Migration Tool in MDT 2010.

This first example tells MDT to try to determine where to store the data. If there is enough space it will store it locally utilising the hardlinks feature:

UserDataLocation=Auto

This example shows a User State Migration using a network share:

UserDataLocation=NETWORK
UDShare=\\SRV01\MigData$
UDDir=%OSDComputerName%

To skip the Lite-Touch wizard pages Specify whether to capture an image and Specify whether to restore user data enter this property in your customsettings.ini file:

SkipUserData=YES

After using the settings above, MDT is able to automate User State Migrations to the locations you have configured using the power of the ZTIUserState.wsf script.

Now, that takes care of the where but there’s still the matter of what. In the real world you will want control over the data that you migrate so read on for the advance bit.

Firstly the task sequence step Generate Application Migration File runs the script ZTIAppXmlGen.wsf with the /capture switch. It creates a file called ZTIAppXmlGen.xml which contains a list of all the extra file extensions on the machine. This will be used later by scanstate.exe to target new file types.

Next, the task sequence step Capture User State is run. It uses the ZTIUserState.wsf script with the /Capture switch to leverage the Scanstate.exe tool from the USMT to capture the user state data.

Finally, after the new OS is laid down, the task sequence step Restore User State is run. This step uses the ZTIUserState.wsf script with the /Restore switch to leverage Loadstate.exe to restore the captured user state data.

For those who need to know more about USMT, I suggest watching this webcast series, for all others continue reading.

There’s an extra switch in the ZTIUserState.wsf script. /Estimate generates a log file called USMTEstimate.log. This is used for capacity planning your migrations.

You may want to capture specific user profiles, in which case you can use the UDProfiles property in your customsettings.ini to list the user profiles. This is an example:

UDProfiles=Administrator, Scriptimus, User2, User3

If you’ve created customised XML files that surgically target your data you can use them in your migrations by using the USMTMigFiles property to call them in your customsettings.ini. They need to be sequentially numbered like in the example below:

USMTMigFiles001=MigApp.xml
USMTMigFiles002=MigUser.xml
USMTMigFiles003=MigSys.xml
USMTMigFiles004=MigCustom.xml

If you’ve created a custom Config.xml using scanstate.exe to limit which files are migrated then you can use this custom XML file by using the USMTConfigFile property:

USMTConfigFile=Config.xml

Finally, you can use ScanStateArgs and LoadStateArgs to customise the way that USMT is run during the migration process.

ScanStateArgs=/v:5 /o /c

The /v switch in the above example tells scanstate.exe to increase the level detail in your log files (0-15 are the options). The /o switch will overwrite any data in the target migration store as opposed to just returning an error and stopping. The /c Switch will continue on errors unless something really really bad happens.

This is an example of LoadStateArgs usage:

LoadStateArgs=/v:5 /c /lac

It’s the same as ScanStateArgs except for the /lac switch which tells Loadstate.exe that if it’s migrating a local account and it doesn’t exist on the target computer then it should disable it after creation.

Below is a list of resources for the User State Migration Tool.

User State Migration Tool 4.0 User’s Guide
USMT 4.0 XML Elements Reference

My final words are only to say the User State Migration Tool is a powerful way of controlling your large scale enterprise migrations and more imporantly. . .it’s free!

Advertisements

About Andrew Barnes

A Scripting and Deployment Specialist.
This entry was posted in Deployment, MDT 2010 and tagged , , , , , , , . Bookmark the permalink.

27 Responses to MDT 2010: User State Migration

  1. Pingback: MDT 2010: User State Migration (Lite-Touch) - Chris Nackers Blog

  2. and it’s “free”

    Like

  3. Tommy says:

    How do you watch the Technet videos? I click the links, it just opens same page. I have tried in Safari and IE in my Virtual Machine.

    Like

    • It looks like Microsoft have removed the videos from their sites. Sad as I found them really useful in learning USMT. If you google the names you may find them elsewhere on the net.

      Like

  4. bri says:

    So which task sequence do i use? Or would i have to create a custom one and enable those steps.

    Like

  5. Mcosy says:

    Hi Andrew,

    How do i set the profile path to D using MDT 2012?

    AS

    Like

  6. Kavin Natarajan says:

    Hi Andrew Barnes :
    I am need to exclude the d: drive state capture from the USMT offline state capture please help me on this ? “DeploymentType=REFRESH”

    awaiting for your reply

    Like

  7. Ethan says:

    Hey Andrew,
    I have a task sequence that is solely used to capture user states, so that we may deploy them to new machines at our convenience. My problem lies with skipping the capture user state wizard page, as well as the backup computer screen. I do not want to do complete computer backups at all, just user state captures. I have defined the skipuserdata=YES and skipcomputer backup=YES, but still see both screens.

    Any help would be greatly appreciated!!

    Like

    • Hi Ethen,

      I’ve written a post on Skipping Deployment Wizard Panes that should help you. It’s here.

      /Andrew

      Like

      • Ethan says:

        Andrew,

        Thanks for the link! Unfortunately I have already perused your article when doing my initial setup. My problem seems unique in the fact that I have previously successfully been able to skip that particular screen, but now it is no longer bypassing it. I do indeed have the following settings, as directed in your write up:
        SkipComputerBackup=YES

        SkipUserData=YES
        UserDataLocation=NETWORK
        UDShare=\\MYSERVER\backups\1_USMT_CAPTURES$
        UDDir=%ComputerName%

        Regardless, I am still seeing both the “User Data” and “Computer Backup” screens. It is defaulting to the “Specify a location” radial, but the Location field is not populating. Through research I have read that this is a known error, and can be resolved by utilizing SkipUserData=YES control. I did as such, and it worked, but due to some tomfoolery of my own I guess I modified by cs.ini incorrectly…..Any thoughts? Possibly a precedence issue with these controls?

        Like

      • I suggest looking through the code in the wizards to see what logic is affecting your scenario. Start with the deploywiz_definition_enu xml

        Like

  8. Randy Villarica says:

    Andrew,

    Great information! I’ve certainly found the information you provided invaluable in our Windows 8 deployment using MDT (Lite touch). Just had a quick question regarding USMT. We have several machines where USMT hangs. This article shed some light on the issue and gave us a solution:
    http://blogs.technet.com/b/askds/archive/2011/04/14/usmt-pauses-at-quot-starting-the-migration-process-quot-for-many-minutes-then-works.aspx

    Basically we run SET MIG_IGNORE_PROFILE_MISSING=1 before we run scanstate \\MDT_SERVER\usmt$\%computername% /i:miguser.xml /l:\\MDT_SERVER\usmt$\%computername%\scanstate.log /v:13 /vsc /nocompress /uel:30 /listfiles:\\MDT_SERVER\usmt$\%computername%\files.txt

    We do the above step in the OS right now so we can determine that the filtering works. We’re now ready to automate this step in the MDT process. What would our ScanStateArgs= look like and how would we run the SET MIG_IGNORE_PROFILE_MISSING=1 before running scanstate?

    Like

  9. Ram says:

    Hello Every one,
    We have a custom requirement in migration from XP to Win7. We have Two partitions in XP c, d. Now in Win7 Our Mangement decide to put 3 Partitions, C:50 Gb D: 5Gb for Paging file, E: Remaining. While doing migration is it possible to restore old XP C drive data to New Win7 C:\ and Old XP D:\ Data to New Win7 E:\. What changes do I have to do.

    Please help me in this. I am new bee to MDT.

    Ram.

    Like

  10. Alfaz Khan says:

    Hi,
    Need advice. When restoring user state files from one partition are copied to another kindly advise (Exampled files in D drive are duplicated to the OS disk ). Thanks

    Like

  11. Visokoo says:

    Thanks for the wonderful guide.

    In regards to UDProfile, is it possible to do exclusions with that? For example, UDProfile=%computername%\*

    If not exclusions, then is it possible to specify a domain name with a wildcard for users so the system just migrates domain accounts?
    UDProfile=domain\*

    Thanks in advance for any help!

    Like

  12. jbauzone51 says:

    Hi thanks for this good article !!!
    I have a question for you :
    Is it possible to do a migration XP to Seven using USMT with option /hardlink (XP 2 partition to Windows 7 one partition) saving data C and D and restore to C on windows 7) ?

    Like

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