Video Screencast Help
Symantec Appoints Michael A. Brown CEO. Learn more.
Endpoint Management Community Blog

Deployment Server 6.9 SP4, USMT 4 and Windows 7 migration

Created: 04 Jan 2011 • Updated: 10 Feb 2011 • 8 comments
Andrey Shipov's picture
+2 2 Votes
Login to vote

As many other companies, we are at the stage when we are almost ready to migrate our client PCs and end users to Windows 7.

In this short article I will try to explain why we decided to use USMT to achieve the desired result.

Tools and resources

I assume that you know what USMT is and understand how to use it and it’s limitations.

If this is the first time you hear about USMT, I strongly recommend referring to Microsoft TechNet first.

 

Below are the tools and resources I found very helpful while working with USMT

 

USMT 4 TechNet resources

http://technet.microsoft.com/en-us/library/dd560801%28WS.10%29.aspx

http://technet.microsoft.com/en-us/library/dd560781%28WS.10%29.aspx

 

USMT 4 for Windows 7 and Server 2008 R2

USMT is installed as part of WAIK installation; get the latest version from Microsoft here

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34

You need to download the file KB3AIK_EN.iso

 

USMT XML Builder

http://www.wintools.com.au/usmtgui.php

You can get the trial version; it will help you to understand the logic of USMT configuration files.

This product has tendency to mess things up, always check the final file manually.

 

And of course your best friend is always

www.google.com

 

USMT or PC Transplant?

After looking at both we have decided to go with USMT as it was more flexible for our needs.

But the choice is yours and I would recommend looking at different tools, before making the final decision.

Migrate Or Not To Migrate?

Before you start migration you need to decide what exactly do you want to migrate:

  • Are you just changing the OS and keeping application the same?
  • Are you changing the OS and applications?
  • What data do you want to migrate?
  • Who is backing up users’ local files: users themselves or administrators?

Below is the example of our migration scenario.

FROM                                                                                                   TO 

Windows XP Pro SP3

Office 2003 Pro

Microsoft IE7 and secure certificates

Mozilla Firefox 3.x

Approved custom applications

Not approved applications

Various development applications and tools

Personal data in various locations

hosts and lmhost files

Windows 7 Ent 32

Office 2010 Pro Plus

Microsoft IE8

Mozilla Firefox 3.6.12 (or latest)

Approved custom applications

Not approved applications

Various development applications and tools

Personal data in various locations

hosts and lmhost files

 

After testing and debating what and how we will migrate we have decided the following:

·         Office 2003 to Office 2010
There is no migration path, but we can preserve .nk2 files (recently typed e-mails cash) and then convert them to Office 2010 format (this will be a manual task)

·         Microsoft IE7 to Microsoft IE8
We need to migrate the favorites and any certificates.
Favorites are just a folder, but certificates will have to be backed up/ restored by the user manually. Communication with detailed instructions will need to be sent to users.

·         Mozilla Firefox 3.x
Firefox does not migrate very well, too many variables and custom features.
We have decided that users will have to backup/ restore Firefox favorites manually. Communication with detailed instructions will need to be sent to users.
As a precaution we are capturing .json files (this is a latest auto backup of Firefox updates).

·         Standard set of applications/ Not approved applications
We have tested all approved applications with Windows 7 and they all work. If users have not standard applications installed on their XP machines we will look at them on individual basis.

·         Development tools and applications.
This is the biggest “show stopper” for any migration, as many development tools need to be installed by the user and require custom configuration during installation.
We are still debating the best approach, but looks like we may go with the separate image for the developers with all the applications they need preinstalled and configured.

·         Personal Data
We have decided to migrate:

o   All desktop items

o   My document items (local only, not offline my docs)

o   All data from C:\ drive, apart from temp and system files and folders (see exclusions in miguser.xml)

·         hosts and lmhost files
we are migrating these files across to Windows 7 with the source files as priority

 

USMT Shared Folder

The following is the simplified configuration example and you can easily modify it to your needs.

 

You need to create the shared folder for USMT.

You can create folder like one below on your Deployment Server and then share it.

D:\USMTDATA\

USMT\

                                                captures\ - you need to create this folder

                                                x86\ - this folder is copied from USMT installation on your PC

(\Program Files\Windows AIK\Tools\USMT)
                All .xml files go there also.

               

Share it something like USMTDATA$

Configuring and using USMT

USMT will scan source Computer and save findings into the flat file, then when it is run on the target Computer it will restore captured data. Example commands are below.

You need to run ether locally or from the network

USMT Scan State

d:\usmtdata\usmt\x86\Scanstate.exe /i:d:\usmtdata\usmt\x86\miguser.xml d:\ usmtdata\usmt\captures\%computername% /uel:30 /ui:<domain name>\*

USMT Load State

d:\usmtdata\usmt\x86\Loadstate.exe d:\ usmtdata\usmt\captures\%computername% /i:d:\ usmtdata\usmt\x86\miguser.xml

Scanstate switches explained

miguser.xml – configuration file for what is captured and restored.

%computername% - tells USMT to use PC’s NetBIOS name for the folder name

Please note that switches below cannot be used with /all (explicitly migrate all users)

/ui:<domain name>\* - specifies domain and user name

If you have users from different domains login to the same computer and want to migrate all of them use this, it will also migrate all local users
ui:*\*

To only migrate domain and exclude all local users use
/ue:* /ui:DomainName\*

/uel:30 – will only capture users accounts if user logged in the last 30 days, or whose accounts have been otherwise modified on this computer.

Unfortunately this option does not work with /ue: commands.
If you use uel:<number of days> it will disregard any /ue: commands
So you can use

/uel:30 /ui:DomainName\* - this will capture all local and DomainName users who have logged on, or whose accounts have been otherwise modified on this computer.

OR

/ue: /ui:DomainName\* - this will ignore all local accounts and capture only domain accounts

The following will still capture all active in 30 days users: domain and loca
/ue:* /uel:30 /ui:DomainName\*

So, you can either exclude some accounts OR exclude account with no activity in last number of days, but you cannot have both when running scanstate.

However, you can exclude local user accounts when running loadstate with the switch
/ue:%computername%\*

So please take this in to account when planning for the USMT files storage.

 

Run USMT directly from shared drive

You can map USMTDATA$ share to the client computer and run usmt from the share.
Use the script below to do it (modify it for loadstate accordingly).
If you run it from the Deployment Server %DSSERVER% will be automatically replaced by the DS name

REM Migrate All users active in last 30 days
set server=%DSSERVER%.YOURDOMAIN.com
set share=usmtdata$
set drive=w:
set domain=YOURDOMAIN.com
set user=USERNAME - user that has access to USMT share
set password=above USER password
net use %drive% \\%server%\%share% %password% /user:%domain%\%user% /persistent:no
REM USMT Capture
%drive%\USMT\x86\scanstate.exe /i:%drive%\USMT\x86\miguser.xml %drive%\USMT\captures\%computername% /uel:30 /ui:YOURDOMAIN\*
REM Disconnect drive
net use %drive% /delete

 

Configure custom miguser.xml

We are using only one configuration file for USMT: miguser.xml, so I will explain what changes we have done to it.

Both files are attached: miguser-orig.xml and miguser.xml

 

Default miguser-orig.xml

If you look at the default miguser-orig.xml file you will see that USMT is capturing:

·         users’ data inside each user profile

·         standard shared data

·         searches local disks for particular file types outside user profiles folder.

 

It will capture the following

<!-- This component migrates My Video files -->

<!-- This component migrates Shared Video files -->

<!-- This component migrates My Music files -->

<!-- This component migrates Shared Music files -->

<!-- This component migrates Desktop files -->

<!-- This component migrates Shared Desktop files -->

<!-- This component migrates Start Menu files -->

<!-- This component migrates Shared Start Menu files -->

<!-- This component migrates My Documents files -->

<!-- This component migrates Shared My Documents files -->

<!-- This component migrates My Pictures files -->

<!-- This component migrates Shared Pictures files -->

<!-- This component migrates Favorites -->

<!-- This component migrates Shared Favorites -->

<!-- This component migrates Quick Launch files -->

<!-- This component migrates user files with known extension-->

 

Following folders are excluded:

\Program Files\*

\Windows\*

 

Default miguser-orig.xml will work quite well and capture a lot of data, but we did not like that it transferred some not needed data and didn’t capture files which extensions that are not listed. It also transferred Start Menus, but because we are deploying different applications they are not relevant.

 

So, to fix the issue we did some modification to themiguser.xml.

·         We are not transferring
<!-- This component migrates Start Menu files -->
<!-- This component migrates Shared Start Menu files -->
This is done by just deleting actual section from the xml file

·         We are not searching for files by extensions, but capture all files and just exclude particular folders.

·         We are also capturing .nk2 and .json files in each user profile and restore them onto user’s desktop in Windows 7 to MD folder.

 

To change what files we capture and what data to exclude we changed the following section in miguser.xml. This is the actual code and you can use it.

We have replaced default

<!-- This component migrates user files with known extension-->

With modified

<!-- This component Migrates all files from local disks including subfolders-->

                <component type="Documents" context="UserAndSystem">

                                <displayName _locID="miguser.userdata">User Data</displayName>

                                <role role="Data">

                                                <rules context="User">

                                                                <include>

                                                                                <objectSet>

                                                                                                <pattern type="File">C:\* [*]</pattern>

                                                                                                <pattern type="File">%CSIDL_APPDATA%\Microsoft\Outlook\ [*.NK2]</pattern>

                                                                                                <pattern type="File">%CSIDL_SYSTEM%\drivers\etc\ [hosts]</pattern>

                                                                                                <pattern type="File">%CSIDL_SYSTEM%\drivers\etc [lmhosts]</pattern>

                                                                                                <pattern type="File">%CSIDL_APPDATA%\Mozilla\*\bookmarkbackups\ [*.json]</pattern>

                                                                                </objectSet>

                                                                </include>

                                                                <exclude>

                                                                                <objectSet>

                                                                                                <pattern type="File">C:\temp\* [*]</pattern>

                                                                                                <pattern type="File">C:\SwSetup\* [*]</pattern>

                                                                                                <pattern type="File">C:\Quarantine\* [*]</pattern>

                                                                                                <pattern type="File">C:\RECYCLER\* [*]</pattern>

                                                                                                <pattern type="File">C:\System Volume Information\* [*]</pattern>

                                                                                                <pattern type="File">C:\CorporateImages\* [*]</pattern>

                                                                                                <pattern type="File">C:\Config.Msi\* [*]</pattern>

                                                                                                <pattern type="File">%PROFILESFOLDER%\* [*]</pattern>

                                                                                                <pattern type="File">%CSIDL_WINDOWS%\* [*]</pattern>

                                                                                                <pattern type="File">%CSIDL_PROGRAM_FILES%\* [*]</pattern>

                                                                                                <pattern type="File">C:\ [*.bat]</pattern>

                                                                                                <pattern type="File">C:\ [*.cfg]</pattern>

                                                                                                <pattern type="File">C:\ [*.com]</pattern>

                                                                                                <pattern type="File">C:\ [*.dat]</pattern>

                                                                                                <pattern type="File">C:\ [*.dll]</pattern>

                                                                                                <pattern type="File">C:\ [*.ini]</pattern>

                                                                                                <pattern type="File">C:\ [*.sys]</pattern>

                                                                                                <pattern type="File">C:\ [*.log]</pattern>

                                                                                                <pattern type="File">C:\ [ntldr]</pattern>

                                                                                </objectSet>

                                                                </exclude>

                                                                <locationModify script="MigXmlHelper.Move('%CSIDL_DESKTOPDIRECTORY%\MD\')">

                                                                                <objectSet>

                                                                                                <pattern type="File">%CSIDL_APPDATA%\Microsoft\Outlook\ [*.NK2]</pattern>

                                                                                                <pattern type="File">%CSIDL_APPDATA%\Mozilla\*\bookmarkbackups\ [*.json]</pattern>

                                                                                </objectSet>

                                                                </locationModify>

                                                                <merge script="MigXmlHelper.SourcePriority()">

                                                                                <objectSet>

                                                                                                <pattern type="File">%CSIDL_SYSTEM%\drivers\etc\ [hosts]</pattern>

                                                                                                <pattern type="File">%CSIDL_SYSTEM%\drivers\etc [lmhosts]</pattern>

                                                                                </objectSet>

                                                                </merge>

                                                </rules>

                                </role>

                </component>

 

 

 

 

 

All you need to do now is to run script to capture data, deploy new OS and run script to restore data back into the new OS environment.

If you have any questions please ask.

 

Andrey Shipov

IS Infrastructure Senior Engineer

Manchester, UK

Comments 8 CommentsJump to latest comment

KSchroeder's picture

Hi Andrey,

Nice work with this!  Can you expand on why you didn't use PCT?  How was USMT more flexible for your needs, or did it just have better support for Windows 7?  Also, you put a lot of effort into this; you may want to check with the Community Manager (ohzone) about getting it re-published as an Article as opposed to a Blog.

Thanks,
Kyle
Symantec Trusted Advisor

For Forum threads, please click "Mark as Solution" if answered.
For all content, please give a thumbs up if you agree with or support the post.

+3
Login to vote
Andrey Shipov's picture

Hi Kyle

We have tried PCT, but we could not get the consistent results with it in our environment and it was more labor intensive.
To summaries the reasons for USMT:

  • First of all yes, we had better support for Windows 7 as part of Microsoft program.But we compared PCT and USMT prior to Microsoft involvement.
  • USMT allows more granular files/data selection
  • USMT works very well in the mixed domains environment: you can cherry pick user/domain configuration to migrate from source computer.
  • With USMT you can manually restore data if loadstate.exe fails for any reason.

From my miguser.xml you can see that we explicitly capturing data from C:\ as we have single partitions on all our client computers. This is communicated to the end users and all data from any additional local drives are backed up by the end user.
If you decide to capture data from any location on local disk, consider using key /localonly
to exclude mapped and external drives.

I will stress again, that you need to have the migration plan first and then choose the tools according to it. You need to be confident that tools you choose will work in your environment with the desired results and I cannot tell that USMT is definitely the Tool, I just merely share my experience to help with the decision.

PS Will try to add the script for drive mapping over the weekend.

Andrey Shipov
IS Infrastructure Senior Engineer
Manchester, UK

 

Andrey Shipov
IS Infrastructure Senior Engineer
Manchester, UK

-1
Login to vote
Andrey Shipov's picture

As promised, script to

Run USMT directly from shared drive

You can map USMTDATA$ share to the client computer and run usmt from the share.
Use the script below to do it (modify it for loadstate accordingly).
If you run it from the Deployment Server %DSSERVER% will be automatically replaced by the DS name

REM Migrate All users active in last 30 days
set server=%DSSERVER%.YOURDOMAIN.com
set share=usmtdata$
set drive=w:
set domain=YOURDOMAIN.com
set user=USERNAME - user that has access to USMT share
set password=above USER password
net use %drive% \\%server%\%share% %password% /user:%domain%\%user% /persistent:no
REM USMT Capture
%drive%\USMT\x86\scanstate.exe /i:%drive%\USMT\x86\miguser.xml %drive%\USMT\captures\%computername% /uel:30 /ui:YOURDOMAIN\*
REM Disconnect drive
net use %drive% /delete

 

Andrey Shipov

Andrey Shipov
IS Infrastructure Senior Engineer
Manchester, UK

-1
Login to vote
xxmarine1743's picture

What is the syntax you use to push the data back to the newly imaged machine? Also,assume you are doing a wipe and load? If so,do you have some kind of check to ensure that the USMT ran against the machine before the wipe and load image is deployed.

-1
Login to vote
Andrey Shipov's picture

Hi xxmarine1743
sorry for the delayed reply.
You are right in thinking that we do wipe and deploy, but we capture the image of the target computer with the old OS before we wipe it with the new OS.

Below is the command line to restore USMT captured data

%drive%\USMT\x86\loadstate.exe %drive%\USMT\captures\%computername% /i:%drive%\USMT\x86\miguser.xml /ue:%computername%\*

Where /ue:%computername%\* excludes local user accounts from loading

Our users check restored data for consistency and if data is missing we will restore manually from the back up image.

Hope this answers your question.
Andrey Shipov
 

 

 

Andrey Shipov
IS Infrastructure Senior Engineer
Manchester, UK

-1
Login to vote
BBC's picture

 Hi all,

I've been doing about the same for quite some time now and this might also be interesting for you. If migrating data from one machine to another, it went a bit difficult as you somehow need to pass on the source machine name to the job. For this I used part of a script I found some time ago and allowing to pass a parameter to the job within the name. Since I run the USMT locally on the client, you may need to change the parts according to how you do this. Attached is a snapshot of the naming of the job and below the script I use. Hope this could be useful for you folks?

-BBC

PS: I should mention that we do migrate our clients from WinXP SP3 x32 to Win7 x64.

Script: 

    REM [Win64] IDSM Copy USMT tools & restore profile data 

\\%DSSERVER%\eXpress\TechSup\Windows\x64\wlogevent.exe -c:0 -l:2 -ss:"FYI: Reading Computer name."
REM This section reads the job name from the DB and uses the information within the brackets as PARM1.

set A=%JOBNAME%
set B=%A:*(=%
set PARMS=%B:)=%
FOR /f "tokens=1" %%A in ('echo %PARMS%') do (
set PARM1=%%A
)

REM Here I check if the USMT is on the client and if not I copy it
IF EXIST C:\DisneyIT\MIG\USMT RD C:\DisneyIT\MIG\USMT /Q /S
\\%DSSERVER%\eXpress\TechSup\Windows\x64\wlogevent.exe -c:0 -l:2 -ss:"FYI: Copying USMT to capture user data."
XCOPY \\%DSSERVER%\eXpress\DSLib\Global\Images\WIN\Win7\USMT\*.* C:\DisneyIT\MIG\USMT\*.* /S /E /Y
IF EXIST "C:\DisneyIT\MIG\USMT\x64\usmtutils.exe" GOTO Restore
:FAIL1
\\%DSSERVER%\eXpress\TechSup\Windows\x64\wlogevent.exe -c:10050 -l:3 -ss:"FYI: USMT not (completely) copied."
EXIT /B 10050

REM Starting the restore
:Restore
\\%DSSERVER%\eXpress\TechSup\Windows\x64\wlogevent.exe -c:0 -l:2 -ss:"FYI: Checking source folder on %DSSERVER%."
IF NOT EXIST \\%DSSERVER%\eXpress\DSLIB\Local\USMT\%PARM1% GOTO RestErr
\\%DSSERVER%\eXpress\TechSup\Windows\x64\wlogevent.exe -c:0 -l:2 -ss:"FYI: Starting restore of user data for %PARM1% to %COMPNAME%."
CD \DisneyIT\MIG\USMT\x64
loadstate.exe \\%DSSERVER%\eXpress\DSLIB\Local\USMT\%PARM1% /i:migapp.xml /i:miguser.xml /v:13 /l:\\%DSSERVER%\eXpress\DSLIB\Local\USMT\%PARM1%-%COMPNAME%_Restore.LOG
\\%DSSERVER%\eXpress\TechSup\Windows\x64\wlogevent.exe -c:0 -l:2 -ss:"FYI: Restore process onto %COMPNAME% finished."
:END
EXIT /B 0

:RestErr
\\%DSSERVER%\eXpress\TechSup\Windows\x64\wlogevent.exe -c:10050 -l:3 -ss:"FAIL: Computer folder NOT found. Please investigate !

snap00568.png
+1
Login to vote
Andrey Shipov's picture

Hi BBC
Thank you for sharing the script, we do not have many migrations to a new machine, but in a few cases we had we just manually renamed the captured folder to a new computer name. I can try to automate this process now, to be honest so far we had less than 10 migrations to new computers and it was not a real problem. But more we automated the easier it gets.

Andrey Shipov

Andrey Shipov
IS Infrastructure Senior Engineer
Manchester, UK

-1
Login to vote
oxy6en's picture

Hi,

I'm going to migrate domain user which has local admin rigth to Windows 7 in the same computer. So USMT need to capture and restore local admin account membership and will restore their admin right on Win7. Just wondering if the value below is the correct one on OSDMigrateAdditionalCaptureOptions as follow:

/ue:* /uel:60 /ui:DomainName\* /conifg:"%_SMSTSMDataPath%\Packages\%_OSDMigrateUsmtPackageID%\%PROCESSOR_ARCHITECTURE%\UserConfig.xml"

I'm expecting the outcome that USMT will copy accross the admin local group membership.

+3
Login to vote