How to using USMT to migrate user account & application settings

How to using USMT to migrate user account & application settings

How you perform user account profile & data migration in general with PC Refresh & PC Replacement scenario? I bet in most of case helpdesk staff will using external HDD with USB 3.0 cable or RJ-45 cable to migration user data, some of them may using some third-party paid software with fancy feature… That’s good, but image if you are the IT guy in the office and was being called to perform a PC replacement with 300 above machines within limited timeframe how you gonna handle that? One by one that’s clearly is not a good ideal even you have some extra teammate who work with you to doing this case. So that is the USMT (User Stat Migration Tool) came to play.

In the following I will step by step demonstrate a basic USMT usage with some common command options. Please note the version of USMT that I’ve used are version 10.0 you may get it from latest version of Windows ADK for Windows 10.

Once you’ve downloaded the Windows ADK then you run the “adksetup.exe” with elevated permission.

Select the feature you want in the case we choose “User State Migration Tool (USMT)” and hit “Install”.

Once the installation is completed you can find the USMT tool under “C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\”. Note the location may vary depends on which location you choose to install Windows ADK above are default path. And in the folder of User State Migration Tool you can see there have 3 set of folder point to 3 different platform, choose “amd64” if you are using 64bit of OS otherwise choose “x86” for 32bit OS. (“arm64” usually related to device like Surface Pro X series)

USMT support collect user profile and settings and written to share folder or removable media, so let’s make it simple choose go with removable media. (But in most case you will rarely collect those data to a removeable media cause you will have to prepare with a huge USB flash drive or HDD and plug-in them onto the machine if you having 300 machines you can image that). 😂

USMT include three command-line tools:

  • ScanState.exe
  • LoadState.exe
  • UsmtUtils.exe

USMT also includes with three of modifiable .xml files:

  • MigApp.xml
  • MigUser.xml
  • MigDocs.xml

We’ll most only using “ScanState.exe” & “LoadState.exe” with “MigApp.xml” & “MigUser.xml”

Okay, so after you copied USMT with amd64 version to your removable media and connect to the target machine then you fire up PowerShell go to the USMT folder:

Run with the following command to collect user profile with data to removable media:
ScanState.exe E:\Migration /i:migapp.xml /i:miguser.xml

If there is not any error message and the return code was 0 then you are success. Now we can start to restoring collected user data with profile. After you plug-in that removable media to another target machine then you type with the following command in PowerShell:
LoadState.exe E:\Migration /i:migapp.xml /i:miguser.xml /lac:password /lae /c

Again all 100% done with return code 0 means your user profile with data has being restored. There is something you need to know:

  • /lac:[Password] For “local account create”. An empty password is used by default. USMT will create the account on the destination computer but it will be disabled.
  • /lae For “local account enable”. Enable the account that was created with the /lac option. And must use with /lac option.
  • /c When this option is specified, the ScanState command will continue to run, even if non-fatal error occur. Any files or settings that cause an error are logged in the progress log. Without the /c option, the ScanState command will exit on the first error.

Fore more please refer to:

  • https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-scanstate-syntax
  • https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-loadstate-syntax

Some common error explain:
/lac must be placed otherwise you will got return code: 14 for not specified local account.

If you are typed with wrong path of the “.MIG” file then when you proceed with “LoadState.exe” command will got return code: 27 for invalid store path.

To using USMT you had to be aware that USMT mostly fit for performing large-scale automated deployments. So, if you only need having few computers less than 15 then you should go with other third-party solution. Overall, this tool is good for Low-touch deployment & Zero-touch deployment for Windows 10. And can helps to reduce end-user downtime to customize desktops and operating system settings and increase employee satisfaction with the migration experience. BTW, remember to planning with a large storage space for USMT as usually the collected MIG file were pretty big!

Leave a Reply

Your email address will not be published. Required fields are marked *