How To Migrate User State between PCs using SCCM 2007 Task Sequences
Written by Neil Harrison, Microsoft Premier Field Engineer.
The other day, a customer asked me for some information on how to get started with capturing user state within System Center Configuration Manager (ConfigMgr) 2007 as they have an upcoming Windows 7 mass deployment. As a result, I was hunting around online for an example or a scenario that I could forward on which outlined the basics of setting up these simple task sequences, but to my surprise I couldn’t find any that really provided that information.
This article is going to be my attempt to fill in that void. We won’t go in to the advanced details about what each particular setting does in the User State Migration Tool (USMT) tool, and I also won’t go in to details about advertising task sequences, etc. as I’m hoping most people will know how to find that information elsewhere if they need it. Hopefully with this article you will have enough information to get started with migrating your user profiles and then it’s just a matter of referring to the TechNet documentation to learn about the various switches and options available.
How to capture user state and transfer it to a new PC
In this particular scenario we are capturing user state from a PC that is being retired and transferring the user state to a new PC. The steps outlined here can easily be ported to other scenarios such as a workstation refresh.
First off, let’s cover some basics of what we need in place to get started.
- We’ll need a State Migration Point (SMP) configured for our site. The steps to add this site system role into ConfigMgr are documented here and are pretty straight forward. Just keep in mind that you will need to make sure that the drive you allocate to hold the user data needs to have plenty of storage space available depending on how much data you expect to migrate and the amount of users you will want to migrate at any one time.
- We need the USMT source files to exist in a software package within ConfigMgr. You don’t need to create a program for the package as the Task Sequence will take care of what command syntax to use when running the command.
Note: If you’ve upgraded your site to SCCM 2007 R2 then you’ll already have WAIK 2.0 available to you which contains USMT 4 and supports Windows 7. It can be found under your installed programs directory at Windows AIK\Tools\USMT.
- We need to create a computer association in the Computer Association node in the ConfigMgr console. This association is going to map the source PC and the destination PC for the migration data. This is used for setting the appropriate security on the migration data on the SMP. ConfigMgr is going to encrypt that data so that only the computer identified as the destination PC will have the ability to restore that data.
Now that we have all of our prerequisites in place we just need to worry about 4 individual task sequence steps and how we utilize them.
Task Sequence Step 1: Request State Store
The first step we’ll need to add is the Request State Store step and choose to “Capture State from the computer”. This step requests access to a State Migration Point for us to use when either creating user state data or restoring user state data.
What exactly does this do? It will query the Management Point for a list of available State Migration Points available and then choose one of those SMPs based on whether it has the minimum amount of free space available and room to store additional user profiles. It then takes the UNC path for that SMP and uses this to populate the variable OSDStateStorePath.
Task Sequence Step 2: Capture User State
Next we’ll need to use the Capture User State task. This is the task that will actually utilize the USMT package that we have already created and will store AND encrypt the data in the path defined by the OSDStateStorePath variable.
There is a limited subset of the USMT options exposed in the GUI but if those don’t suffice then you can always use the OSDMigrateAdditionalCaptureOptions variable to define additional USMT command line switches and parameters.
This task sequence step is also where you would define your .xml files which dictate the files and settings you actually want to migrate.
Note: As mentioned earlier only the Destination computer defined in your Computer Association record will have the key to decrypt this data later on. The key is available within the ConfigMgr console though if the Administrator needs to access it.
Task Sequence Step 3: Release State Store
Now that that data has been successfully captured we need to add a Release State Store step. This is going to notify the SMP that our capture process is done and it’s safe to go ahead and apply the appropriate permissions to the data so that it is locked down to only the destination computer (as read-only).
Let’s skip over the series of steps that come next in order to prepare our new PC for the restore phase. I won’t get in to those here as we could write an entire reference manual on the possible task sequence steps and groupings you could accomplish.
The important part is that eventually we will need to use another Request State Store step. This time we are populating the same OSDStateStorePath variable but for the purposes of restoring the data as opposed to capturing it so we will want to choose the option “Restore state from another computer.”
Task Sequence Step 4: Restore User State
Next up is the actual Restore User State step. Like the Create User State step, a limited subset of the common USMT options are made available through the dialog box but you can achieve additional functionality or behaviour by using the appropriate Task Sequence variables.
Task Sequence Step 5: Release State Store
Finally we’ll need to add another Release State Store step. This time we are notifying the SMP that our restore process is complete so that the retention policy can kick in for this data. For instance, if we specified 7 days for data retention when we defined our SMP then the data will be retained for 7 days from the time this task sequence step is run.
That’s all there really is to it! The trick is using the right task sequence steps in the right order. Once we have that process nailed down then we can worry about customizing USMT so that the right data is being migrated.