One of the most popular tools to migrate user profiles from one Windows computer to another is the set of CLI utilities – User State Migration Tool (USMT), which is a part of a Windows Assessment and Deployment Kit. USMT tool allow you to automate and simplify the process of migrating the users’ environment and profile while deploying Windows and on another cases.
The transfer of user data takes place in two steps, one of which takes place on the old one and the other one on the new computer. USMT can migrate operating system settings, applications, and even access control lists (ACLs). This means that the user’s access permissions on the target computer will be exactly the same as they were on the source system.
Migrating User Profiles using USMT
The latest currently available version of USMT 10 allows you to migrate user settings and profiles and apply settings from operating systems starting from Windows 7 and up to Windows 10. An important difference from the previous version of this utility is the ability to collect the settings in Offline mode (not while running operating system). If you want to use USMT on older systems (Windows XP, Windows Vista), then you must use version USMT 3.0.1.
You can download the ADK for Windows 10 here.
To install ADK on your admin’s workstation or on source computer, run adksetup.exe file and select User State Migration Tool (USMT) to install:
After the installation is complete, you can find the USMT files in the directory c:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\User State Migration Tool (later you can copy these files to the source computer).
This utility consists of two console programs scanstate.exe and loadstate.exe, as well as a set of XML files describing the process of collecting and applying settings.
Data transfer using USMT can be performed in two steps: exporting data from the source computer using the ScanState command and importing data on the target computer using the LoadState.
USMT allows you to write data to a local disk, removable USB drive or to a network share, but cannot directly transfer data across the network directly from the source to the target computer.
Saving a User Profile with USMT
The first stage of the transfer takes place on the source (old) computer. To collect user data, the scanstate command is used.
Scanstate.exe scans the computer according to the specified requirements, creates a repository, and collects user profiles and accounts, application and OS settings, files and registry keys and other data.
Note. From Windows 10 1607, USMT can’t migrate start menu layout. Instead it you must use Export-StartLayout and Import-StartLayout cmdlets.
The USMT utility creates 4 migration files (in .XML format) that store rules for migrating various kinds of data:
- xml — contains rules for transferring user data;
- xml — contains rules for transferring user profiles;
- xml — document transfer rules;
- xml — covers information on the components that are excluded from the transfer.
To migrate all accounts and user settings from one computer to another, run the command:
scanstate \\fs1\migr\userdata /i:miguser.xml /i:migapp.xml /o
To migrate only two user accounts from one computer to another:
scanstate \\fs1\migr\userdata /ue:*\* /ui:corp\user1 /ui:corp\user2 /i:miguser.xml /i:migapp.xml /o
For example, to create encrypted store (with an encryption key – StR0n51) on a network shared folder using specified configuration files, you can use the following command:
scanstate \\fs1\migr\mystore1 /i:migapp.xml /i:miguser.xml /o /config:config.xml /encrypt /key:"StR0n51"
Also you can use USMT to perform offline profile migration. Boot your system into Windows РЕ environment and run ScanState to export user’s profiles settings.
Another one interesting way to use USMT is to perform a backup of user profiles on some critical computers.
Migrating and Deploying a User Profile with USMT
The second stage of transferring the user profile is performed on the target (new) computer. To complete the migration, use the loadstate.exe command. The loadstate utility imports (unpacks) all store items to the target computer.
To load on source computer all profiles from store created earlier, run:
loadstate \\fs1\migr\userdata /i:miguser.xml /i:migapp.xml
If you want to transfer user’s profile and move a user from one domain to another:
loadstate \\fs1\migr\userdata /mu:/ui:corp\user:/ui:corp2\user /i:miguser.xml /i:migapp.xml
For example, to load user profiles from encrypted store on a network shared run the command:
scanstate \\fs1\migr\mystore1 /i:migapp.xml /i:migapp.xml /i:miguser.xml /decrypt /key:"StR0n51"