Integrate USMT With WDS Image For Profile Migration

by [Published on 10 Nov. 2010 / Last Updated on 11 Nov. 2010]

This article explains how you can integrate USMT 4.0 tool with WDS Image for migrating user profiles automatically.

User Profiles on Windows XP is not compatible with Windows 7. USMT 4.0 must be used to do so. USMT 4.0 is downloadable as part of Windows 7 WAIK and is available at Microsoft site at the below mentioned URL:

You can run USMT tools manually (ScanState and LoadState) to scan and migrate user profiles (including application settings) to Windows 7 but what if you have 1000 computers in your environment and need to migrate user profiles without user intervention. This article explains how you can integrate USMT 4.0 commands (ScanState and LoadState) with WDS Image so that user profiles are migrated automatically and without any user intervention. You need to design a small script which runs after the Windows 7 setup completes. This article assumes that your WDS is up and running on a computer running Windows Server 2008 or R2.


  • You need to have a reference computer in place.
  • Perform Windows 7 fresh installation on a new computer. This article assumes you are installing Windows 7 on C:\ drive.
  • Install WAIK on a computer running Windows 7
  • Copy USMT Directory from C:\ProgramFiles\Windows AIK\Tools\USMT to C:\Windows\USMT on Windows 7 Computer
  • Design a small CMD Script and put the following lines in it. Save it as Migrate.CMD

REM *** START ***  

@ Echo off


C:\Windows\USMT\scanstate.exe c:\USMT /v:13 /o /c /hardlink /nocompress /efs:hardlink /i:MigApp.xml /i:MigDocs.xml /offlineWinDir:c:\windows.old\windows

C:\Windows\USMT\loadstate.exe c:\USMT /v:13 /c /lac /lae /i:migapp.xml /i:migdocs.xml /sf /hardlink /nocompress

REM *** END ***

  • Create the following directory on Windows 7:
  • C:\Windows\Setup\Scripts\
  • Copy Migrate.CMD to C:\Windows\USMT directory. 
  • Create a CMD file called: SetupComplete.CMD.
  • Put C:\Windows\USMT\Migrate.CMD in it.
  • Go to command prompt with "Run As Administrator" and run the following command so that this computer can be prepared for end users:
  • C:\Windows\System32\Sysprep\Sysprep.exe /quiet /generlize /oobe
  • Shutdown this computer.
  • Create a Capture Image in WDS. Follow the steps outlined here for creating a capture image:

That's it. The image will have USMT 4.0 and Migrate.CMD captured in your WDS. Now you can deploy this image to client computers. The image will be deployed to client computers and profiles including application settings will be migrated automatically with the help of Migrate.CMD.

See Also

The Author — Nirmal Sharma

Nirmal Sharma avatar

Nirmal Sharma is a MCSEx3, MCITP and was awarded the Microsoft MVP award in Directory Services and Windows Networking. He specializes in Microsoft Azure, Office 365, Directory Services, Failover Clusters, Hyper-V, PowerShell Scripting and System Center products. Nirmal has been involved with Microsoft Technologies since 1994. In his spare time, he likes to help others and share some of his knowledge by writing tips and articles on various sites and contributing to PowerShell-based Dynamic Packs for www.ITDynamicPacks.Net solutions.

Featured Links