Share via


Step-By-Step How To Migrate users and user Data from XP, Vista, Windows 7 or 8 TO Windows 10 Using Microsoft Tool USMT User State Migration Toolkit

Windows Assessment and Deployment Kit (ADK) for Windows 10 provides new and improved deployment tools for automating large-scale deployments of Windows 10.  What you collect with USMT ScanState is customizable through modifying the XML configuration files.  For more information on the defaults, see What Does USMT Migrate?.  The USMT tools can be used to migrate data from a 32bit machine (x86) to a 64bit (x64) machine thought there are some minor limitations for this scenario.  The User State Migration Tool (USMT) Technical Reference can be found at: https://technet.microsoft.com/en-us/library/hh825256.aspx.

Migrating data from your old computer (source) to your new computer (destination) is basically a four step process which includes:

Step 1: Download and Install USMT tools

Step 2: Gather (Backup) data using the USMT ScanState tool

Step 3: Install Windows 10 or Unpack New computer with OS already loaded

Step 4: Apply (Restore) data using the USMT LoadState tool

 

What you will need:

  1. Access to this step by step guide :)
  2. Access to Internet to download tools from Microsoft
  3. Network or USB drive to store USMT tools (tiny, about 70mb)
  4. Network or USB drive to store Backup data and settings (very large, big enough for all user data)
  5. Access to the Source Machine (the one you will be migrating FROM [Backup])
  6. Access to the Destination Machine (the one you will be migrating TO [Restore])

 

In this post, I will dive into these Steps breaking it down to a click-by-click guide. Before we get started, I will give a bit more detail about what USMT is and does.

The User State Migration Tool (USMT) 10.0 is designed so that an IT engineer can automate and precisely define migrations using the USMT .xml scripting language. In this blog post we will not be modifying any of the configuration files.  You do not need to make any changes for a default migration.  USMT provides the following sample scripts that can be easily modified for customization if needed:

  • MigApp.XML. Rules to migrate application settings.
  • MigDocs.XML. Rules that use the MigXmlHelper.GenerateDocPatterns helper function, which can be used to automatically find user documents on a computer without the need to author extensive custom migration .xml files.
  • MigUser.XML. Rules to migrate user profiles and user data.
    MigUser.xml gathers everything in a user’s profile and then does a file extension- based search of most of the system for other user data. If data doesn’t match either of these criteria, the data won’t be migrated. For the most part, this file describes a “core” migration.
    The following data does not migrate with MigUser.xml:
    • Files outside the user profile that don’t match one of the file extensions in MigUser.xml.
    • Access control lists (ACLs) for folders outside the user profile.

To migrate ACLs, you must specify the directory to migrate in the MigUser.xml file. Using file patterns like *.doc will not migrate a directory. The source ACL information is migrated only when you explicitly specify the directory. For example, <pattern type=”File”>c:\test docs</pattern>.

Step 1: Download and Install USMT tools

  1. You can download the Windows Assessment and Deployment Kit (ADK) for Windows 10 from: https://go.microsoft.com/fwlink/p/?LinkId=526740.  Learn more about what’s in the Windows ADK for Windows 10
  2. Launch adksetup.exe to install tools onto your administrative workstation or your source computer.  This is an automated downloader and installer.  It only has the install bits, not all the bits for the tools,  the tool will download the bits needed during installation.

clip_image001

Click Next a couple times, Accept the license agreement
Select the options you want to install (or just keep the defaults to install USMT) click Install
We will not be using all of the tools so you can turn everything off except USMT for the purposes of copying data off of a machine. If you install PE or other components, they will need to be downloaded so it can take quite some time (hour+ depending on Internet connection) for the large download.

clip_image002

Notice you will need elevated privileges.  If you Add the ACT, you will need to have SQL server also which can be installed if you do not already have it. You should be able to view the files using:

dir “c:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\User State Migration Tool\x86″

  1. If you want to scan/copy/backup files on a different computer (user computer instead of your administrative workstation) you will need to copy the USMT tools to a thumb drive or network share so you can run the tool from the source computer.

clip_image003

[Where F: is your Network drive or USB drive] eg…

  • xcopy “c:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\User State Migration Tool\x86” F:\USMTx86
  • xcopy “c:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\User State Migration Tool\amd64” F:\USMTx64

You are now ready to proceed to the scanstate to backup the from the source computer.

Step 2: Gather (Backup) data using the USMT ScanState tool

Now that you have the tools saved to a USB thumb drive or Network Share, you can run the USMT ScanState Tool in an elevated command prompt from the location saved the files to in Step 1 above:

  • (x86)  F:\USMTx86
  • (x64) F:\USMTx64

Note: You should run USMT from an account with administrative credentials. Otherwise, some data will not migrate. When running the ScanState and LoadState tools you must run the tools in Administrator mode from an account with administrative credentials. If you do not run USMT in Administrator mode, only the user profile that is logged on will be included in the migration. In addition, you must run the ScanState tool on Windows XP from an account with administrative credentials. Otherwise, some operating-system settings will not migrate. To run in Administrator mode, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

  1. From the Windows XP, Vista, Windows 7, or Windows 8 machine (SOURCE): Login to source computer as administrator, Attach USB drives or connect network drives for USMT files and for destination for files and settings backup. Assumptions for this post is the USMT tools drive is F: and the USMTData drive is G:
    • Note that the Destination Drive should allow for very large files (eg. NFTS instead of FAT). The .MIG file that is created with all the user data in it can be massive depending on the amount of data being backed up.
  2. Run elevated Command Prompt – click Start then type Command then Right-Click on Command icon and select Run as Administrator.

Note: Understanding the switches… we need to run scanstate to package our files and settings. You will need to run ScanState

  • F:\USMTx64 is the location on your source computer where you have saved the USMT files and tools.
  • G:\USMTData\DanStolts is the full path to a folder on a network server (or USB drive) where you can create the migration store.
  • /o = Overwrite
  • /c = Continue on non-fatal errors
  • /i:miguser.xml => Read in this user configuration file
  • /i:migdocs.xml => Read in this documents configuration file Default configuration files come with the USMT.
  • [optional] /l switch to place the log file with the <StorPath> By default the log will be created in the default/current folder.
  • /localonly option to exclude the data from removable drives and network drives mapped on the source computer. For more information about what is excluded when you specify /localonly, see ScanState Syntax.
  • NOTE: I strongly suggest you look at the syntax and in particular the /auto and the /genconfig
  • NOTE: Note, once the .MIG file is created, you can manually extract individual files using the usmtutils command https://technet.microsoft.com/en-us/library/hh824962.aspx

 

  1. In the elevated/administrative command prompt window run the following commands

Command

Description

F:

Change to drive where ScanState.exe is located (may be different drive letter for you)

Cd \USMTx64

 

Or

 

CD \USMTx86

Change default Folder where ScanState.exe is located (this is where you copied files above, may be different location for you) use the folder that represents the architecture of the machine you are running on. (either USMTx64 or USMTx86, not both) If you do not change the path, you will need to use the full path when identifying the XML files to use in the scanstate command below.

MD G:\USMTData

MD G:\USMTData\DanStolts

G: is the big drive (network or USB) where I am saving the users data. I am just creating a folder to store the data. Drive letter and path may be different for you.

scanstate g:\USMTData\DanStolts /o /c /i:miguser.xml /i:migdocs.xml /localonly

Run the ScanState.exe file with the appropriate parameters.

Running this command depending on the amount of data can take a very long time. It could take hours.

 

The output log might look something like this:

F:\USMTx64>scanstate g:\USMTData\DanStolts /o /c /i:miguser.xml /i:migdocs.xml /localonly

SCANSTATE.EXE Version 10.0.10586.0

(C) 2012 Microsoft Corporation. All rights reserved.

Log messages are being sent to ‘F:\USMTx64\scanstate.log’

Replacement Manifests folder ReplacementManifests used to service system component manifests is not present. OS settings migration will be done with system component manifests installed onto the system.

Starting the migration process

Processing the settings store

Examining the system to discover the migration units

 XXX-W530\dstolts (1 of 3): 100% done

 MYDOMAIN\dstolts (2 of 3): 100% done

 This Computer (3 of 3): 100% done

Selecting migration units

Gathering data

 XXX-W530\dstolts (1 of 3): 100% done

 MYDOMAIN\dstolts (2 of 3): 100% done

 This Computer (3 of 3): 100% done

 Commit

Success.

 Notice that multiple user accounts (including domain accounts) were backed up.

 

Step 3: Install Windows 10 or Unpack New computer with OS already loaded

I will assume you know how to prepare a new machine with windows 10.  One thing I will point out is you can create a local account (instead of an Azure AD or Domain account) in windows 10 by selecting Join AD on the first choice for setting up the user then on the next screen on the lower left there is a link to setup a Local account.  It is fine (and even desired) if the local account you setup is the same as the local account on the machine you scanned as the accounts can be easily and automatically merged without any script changes or mapping configured.

Step 4: Apply (Restore) data using the USMT LoadState tool

loadstate  /i:migapp.xml /i:miguser.xml d:\USMTData\DanStolts /all /lac:ITProGuru2015 /lae /progress:progress.log /l:load.log

  1. From the Windows 10 machine, Login to computer as administrator, Attach USB drives or connect network drives for USMT files and for source for files and settings backup (USMT.MIG). Assumptions for this post is the USMT tools drive is F: and the USMTData drive is G:
    • Note that the Destination Drive should be big enough to accommodate all the data that is being restored.
  2. Run elevated Command Prompt – click Start then type Command then Right-Click on Command icon and select Run as Administrator.

Note: Understanding the switches… we need to run scanstate to package our files and settings. You will need to run ScanState

  • F:\USMTx64 is the location on your destination computer where you have saved the USMT files and tools.
  • G:\USMTData\DanStolts\ = G: is the big drive (network or USB) where I saved the users data. In this case there should be a G:\USMTData\DanStolts\USMT\USMT.MIG file. You will need to change your drive and path locations.
  • loadstate – This is the executable that will restore data from the migration store
  • /i:miguser.xml => Read in this user configuration file

/i:migdocs.xml => Read in this documents configuration file Default configuration files come with the USMT.

  • USMTData\DanStolts\ is the full path to a folder on a network server (or USB drive) where you have the migration store data (USMT\USMT.MIG).
  • / all = Migrates all of the users on the computer.
  • / lac:ITProGuru2015 = (local account create)

Specifies that if a user account is a local (non-domain) account, and it does not exist on the destination computer, USMT will create the account on the destination computer but it will be disabled. To enable the account, you must also specify /lae.

If /lac is not specified, any local user accounts (that do not already exist on the destination computer) will not be migrated. ITProGuru2015 is the password for the new created account. An empty password is used by default.

  • [optional] / lae (local account enable)

Enables the account that was created with /lac. You must specify /lac with this option.

  • [Optional] /progress:progress.log = Creates the optional progress log. You cannot store any of the log files in StorePath. Path can be a relative or full path. If you do not specify Path, then FileName will be created in the current directory
    • Note: The command line you used will also be written to the log (including the password) so you should protect this file.
  •  /l:load.log = Specifies the location and name of the LoadState log. You cannot store any of the log files in StorePath. Path can be a relative or full path. If you do not specify Path, then the log will be created in the current directory. You can specify /v to adjust the amount of output.

If you run LoadState from a shared network resource, you must specify this option or USMT will fail with an error “USMT was unable to create the log file(s) “. To fix this issue, specify /l:load.log.

  • Note: The command line you used will also be written to the log (including the password) so you should protect this file.
  • For More Options see Loadstate Syntax    https://msdn.microsoft.com/en-us/library/mt299200(v=vs.85).aspx
  • NOTE: Note, you can manually extract individual files using the usmtutils command https://technet.microsoft.com/en-us/library/hh824962.aspx  Examples…
    • Extract Everything:

usmtutils /extract D:\MyMigrationStore\USMT\store.mig C:\ExtractedStore

  • Extract *.txt & *.pdf + provide decrypt key:

usmtutils /extract D:\MyMigrationStore\USMT\store.mig /i:”*.txt,*.pdf” C:\ExtractedStore /decrypt /keyfile:D:\encryptionKey.txt

 

  1. In the elevated/administrative command prompt window run the following commands

Command

Description

F:

Change to drive where LOADSTATE.exe is located (may be different drive letter for you)

Cd \USMTx64

 

Or

 

CD \USMTx86

Change default Folder where ScanState.exe is located (this is where you copied files above, may be different location for you) use the folder that represents the architecture of the machine you are running on. (either USMTx64 or USMTx86, not both) If you do not change the path, you will need to use the full path when identifying the XML files to use in the loadstate command below.

loadstate  /i:migapp.xml /i:miguser.xml G:\USMTData\DanStolts /all /lac:ITProGuru2015 /lae /progress:progress.log /l:load.log

Run the ScanState.exe file with the appropriate parameters.

Running this command depending on the amount of data can take a very long time. It could take hours.

The output log might look something like this:

F:\USMTx64>loadstate  /i:migapp.xml /i:miguser.xml G:\USMTData\DanStolts /all /lac:ITProGuru2015 /lae /progress:progress.log /l:load.log

LOADSTATE.EXE Version 10.0.10586.0

(C) 2012 Microsoft Corporation. All rights reserved.

Log messages are being sent to ‘F:\USMTx64\load.log’

Starting the migration process

Processing the settings store

Selecting migration units

Examining the system to discover the migration units

 XXXDomain\dstolts (1 of 3): 100% done

 XXX-W530\dstolts (2 of 3): 100% done

 This Computer (3 of 3): 100% done

Estimating total file size for the progress log

 XXX-W530\dstolts – 296 files

 XXXDomain\dstolts – 28632 files

 This Computer – 69493 files

Applying data

 XXX-W530\dstolts (1 of 3): 100% done

 XXXDomain\dstolts (2 of 3): 100% done

 This Computer (3 of 3): 100% done

Success.

LoadState return code: 0

F:\USMTx64>

 

 

Note: I changed the paths from when I actually did it so it is possible that there are some typo’s in the paths or file names.

 

If you found this post helpful, please share via social media:

@ITProGuru step-by-step Migrating user data to Windows 10 using USMT User State Migration Tools https://aka.ms/usmt5