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 the Windows Assessment and Deployment Kit. USMT tool allows you to automate and simplify the process of migrating the usersโ environment and profiles while deploying Windows, migrating users between different Active Directory domains, and in other cases.
The transfer of userโs data takes place in two steps:
- Capturing data on the source computer using the ScanState utility.
- Restoring on the target computer using the LoadState utility.
USMT can migrate operating system settings, application settings, user profiles settings, files, registry user hives and even access control lists ACLs (it preserves user profile permissions, but does not perform full system ACL migration). This means that the userโs access permissions on the target computer will be the same as they were on the source system.
Hint. USMT can migrate settings for supported desktop apps, but it does not migrate the apps themselves. Note that USMT does not support migrating settings for Microsoft Store apps. Install the required apps on the target machine before running LoadState, and verify that their settings are supported by the migration XML files.
It’s important to note that the source and destination Windows installations must use the same system language for a supported USMT migration. USMT is not designed to migrate user state between Windows installations with different system languages. In multilingual enterprise environments, you should check the Windows language config before planning a USMT migration.
Important. Keep in mind that USMT does not support Microsoft Entra joined devices as either the source/destination. Microsoft Entra hybrid joined devices may work in some cases, but they are not a tested/supported USMT scenario. For Microsoft Entra joined Windows 11 devices, you should use the organization’s supported provisioning and device-management workflow instead of relying on USMT.
Migrating User Profiles Using USMT
The current USMT version included with the Windows ADK supports collecting user state from supported Windows versions (including Windows 7, Windows 10, and Windows 11). However, the destination computer must run a supported Windows 10 or Windows 11 version. Windows 7 can be used as a migration source, but it is not a supported destination for the current USMT.
Important. Keep in mind that USMT does not support Windows Server OSs.
The important difference from the previous version of this utility is the ability to collect the settings in the Offline mode (not while running the OS).
Download and Install ADK for Windows 11
If you are on Windows 11, note that the WinPE environment is no longer included in the main ADK installer (in case you need bootable recovery environment support), now WinPE is a separate add-on package.
You can download the ADK for Windows 11 here.
- Run adksetup.exe.
- When selecting features, check User State Migration Tool (USMT).
- Click Install.
- Once finished, the USMT files are located in:
C:\Program Files (x86)\ Windows Kits\ 10\ Assessment and Deployment Kit\ User State Migration Tool\
Data transfer using USMT
USMT creates a “migration store” to hold the user data, usually a single large .mig file. The tool allows you to write data to a local disk, removable USB drive, or a shared network folder, but cannot transfer data across the network directly from the source to the target computer.
Hint. A separate tool USMTUtils.exe is used to remove the local migration store.
Saving a User Profile with USMT
The first step of the transfer takes place on the source (old) computer. To collect the userโs data, the scanstate command is used.
Scanstate.exe scans the computer according to the specified requirements, creates a repository, and collects usersโ profiles and accounts, application and OS settings, files, registry keys, and other data.
USMT migration files
The USMT utility creates 4 migration files (in .XML format) that store rules for migrating various kinds of data:
- MigApp.xml โ contains rules for migrating application settings;
- MigUser.xml โ contains rules for migrating user profiles and files;
- MigDocs.xml โ document transfer rules;
- Config.xml โ covers information on the components that are excluded from the transfer.
Important note. Do not use MigUser.xml and MigDocs.xml together! These files contain overlapping migration rules, and using both can cause some files to be migrated more than once or placed in different target locations.
For most modern migrations, use MigDocs.xml when you do not know in advance where users store their data. It discovers files based on folder locations and registered file types, giving you broader coverage than the extension-based MigUser.xml. You should prefer MigUser.xml when you need tighter control over the migration and want to limit it to standard user-profile folders and specific file extensions.
To migrate all accounts and user settings from one computer to another, run the command:
scanstate.exe \\Server\MigrationStore /i:MigUser.xml /i:MigApp.xml /v:5 /o /c
| Switch | What it does |
| \Server\MigrationStore | The destination path where USMT creates the migration store |
/i:filename.xml | Include. This switch specifies the XML file that defines migration rules (e.g., MigUser.xml for files). |
/v:5 | Recommended verbosity level for troubleshooting. |
/o | Overwrite. Forces USMT to overwrite any existing data in the destination folder. |
/c | Continue. Tells USMT to ignore non-critical errors (like a single file being “in use”), this allows to make the migration without stops. |
Data in the user profile migrated by default
- Standard directories from the userโs profile: Documents, Video, Music, Pictures, Desktop, Start menu, Quick Launch settings, Favorites;
- Examples of common user file types:
Documents: .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf, .rtf, .txt, .csv
Archives: .zip, .7z, .rar
Images: .jpg, .jpeg, .png, .gif, .tif, .tiff
Other common user data: .one, .vsd, .vsdx, .mpp, .mpx, .accdb, .mdb
By default, all usersโ profiles on a computer are migrated. You can specify which users to migrate using the include and exclude options.
To migrate only two user accounts from one computer to another:
scanstate \\fs1\migr\userdata /ue:** /ui:corpuser1 /ui:corpuser2 /i:miguser.xml /i:migapp.xml /o
Important. Note that Windows Hello for Business credentials are not migrated by USMT. Users must provision Windows Hello for Business again on the destination device, including their PIN and any biometric sign-in methods (such as fingerprint/face recognition). Windows Hello for Business credentials are tied to the device, and biometric data is stored locally rather than roaming between devices.
Migrate only users who have recently logged into computer
You can only migrate users who have recently logged into the computer. For example, you can specify that only users who have logged into this computer within the last 50 days should be migrated.
For this, the /uel:50 option is used. User profiles are selected by the Last Modified date of the Ntuser.dat files in the user directories under the C:\Users folder:
scanstate \\fs1\migr\userdata /uel:50 /i:miguser.xml /i:migapp.xml /o
With USMT you can also use a specific date. If you only want to migrate users who logged in after January 1st, 2026, you should use:
/uel:01/01/2026
Exclude accounts from migration
Or you can exclude certain accounts from migration:
/ue:"corp\user1" /ue:"corp\user2"
You can exclude all domain usersโ profiles:
/ue:corp\*
Or just local ones:
/ue:%computername%\*
Volume Shadow Copy Service
Scanstate supports the use of Volume Shadow Copy Service. This means you can transfer even files that are locked (used) by currently running applications. The /vsc parameter is used for this.
For example, to create an 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 /keyfile:C:\Secure\usmt-key.txt
Compression
By default, compression is used when saving profile files. This allows the user to reduce the storage file size, but it takes longer to create the archive. You can disable compression with the /nocompress option.
Offline profile migration with USMT
Also, you can use USMT to perform offline profile migration.
At first, boot your computer into the Windows PE environment and run the ScanState to export usersโ profile settings.
After creating a store, you can check its integrity with the command:
USMTUtils.exe /Verify \\fs1\migr\mystore1
Another interesting way to use the USMT is to perform a backup of usersโ profiles on some critical computers.
Note. From Windows 10 1607, USMT does not migrate Start menu layouts. In modern Windows 11 environments, you can usually manage Start menu customization through Group Policy, Intune, provisioning packages, or Start menu config files rather than USMT. Refer to the official Microsoft documentation for options.
Hard-Link Migration (Recommended for In-Place Windows Deployments)
In enterprise environments, you can use hard-link migration instead of creating a migration store on a network share. This method is commonly used during in-place Windows deployment/OS refresh cases (for example, Windows 10 to Windows 11 on the same machine). Instead of copying user files to a separate location, USMT creates NTFS hard links that reference the existing files on the local disk. This significantly reduces migration time and eliminates the need for additional storage space.
scanstate C:\USMT /hardlink /nocompress /i:MigUser.xml /i:MigApp.xml
loadstate C:\USMT /hardlink /i:MigUser.xml /i:MigApp.xml
Hard-link migration works only when the source and destination Windows installations use the same NTFS volume. It is primarily intended for refresh cases rather than computer replacement.
Migrating and Deploying a User Profile with USMT
The second step of transferring the user profile is performed on the target (new) computer. To complete the migration, use the loadstate.exe command. The loadstate tool imports (extracts) all store items to the target computer.
Load all profiles on the target computer from the migration store
To load all profiles on the target computer from the store created earlier, run:
loadstate.exe \\fs1\migr\userdata /i:miguser.xml /i:migapp.xml /v:5 /c /l:C:\Logs\loadstate.log
Common USMT Return Codes
USMT return codes provide only a high-level error category. You should always review the ScanState.log or LoadState.log files to determine the exact reason for the failure.
| Code | Meaning |
|---|---|
| 0 | Success |
| 3 | Success with warnings (one or more errors were skipped because the /c option was used) |
| 26 | Initialization error (USMT initialization failed before migration started) |
| 27 | Invalid migration store location (store already exists without /o, inaccessible path, etc.) |
| 71 | Operating environment initialization failed (for example, insufficient privileges or Windows API initialization failure) |
You can use these return codes together with the ScanState and LoadState log files to troubleshoot migration problems.
Also, note that it is not a complete list. For the full list of USMT return codes, associated error messages, and troubleshooting guidance, see the official Microsoft documentation User State Migration Tool (USMT) return codes.
Transfer userโs profile and move user
If you want to transfer a userโs profile and move a user from one domain to another, use the /mu (Map User) switch:
loadstate \\fs1\migr\userdata /mu:OldUser:NewUser /i:miguser.xml /i:migapp.xml
Note. When you use the LoadState command to migrate domain users, the computer doesnโt need access to the target or source domain controller to apply user profiles.
Specify new domain for users
With the /md:OldDomain:NewDomain option you can specify a new domain for users. This option is used to change the user’s domain during migration. If the username in the source and destination domain is different, you can match the account names in the old and new domain:
/mu:OldDomain\User1:NewDomain\NewUser1
For example, to load user profiles from an encrypted store on a shared network folder run the command:
loadstate \\fs1\migr\mystore1 /i:MigApp.xml /i:MigUser.xml /decrypt /keyfile:C:\Secure\usmt-key.txt
Note. USMT tool integrates natively with MDT and SCCM/MECM. It allows you to fully automate the profile migration as part of operating system deployment task sequences.
What is USMT?
USMT (User State Migration Tool) is a set of command-line utilities included in the Windows Assessment and Deployment Kit (ADK). It is used to automate migration of user profiles, settings, and data when deploying Windows or moving between computers or Active Directory domains.
How does USMT migrate data?
USMT works in two main steps:
- ScanState โ captures user data on the source computer
- LoadState โ restores user data on the target computer
What data can USMT migrate?
USMT can migrate:
- User profiles
- Operating system settings
- Application settings
- Files and folders
- Registry user hives
- User profile ACLs (limited to profile data permissions)
Note that it does not migrate installed applications.
Does USMT migrate installed programs?
No. USMT only migrates application settings, not the applications themselves. Applications must be installed separately on the target computer.
What is a migration store?
A migration store is a container created by ScanState that holds user data. It is typically a single .mig file or a folder-based structure. It can be stored:
- Locally
- On a USB drive
- On a network share
USMT does not transfer data directly between computers over the network.

Probably too late for Luiz, but I think this component would achieve what you’re looking for. Though the case for sub-folders with PST files under the …\Outlook source folder may complicate matters and require collision handling as well.
PST Files with Relocation
MigXmlHelper.DoesObjectExist(“File”, %CSIDL_MYDOCUMENTS%\Outlook [*.PST]”)
%CSIDL_MYDOCUMENTS%\Outlook [*.PST]
%CSIDL_MYDOCUMENTS%\Outlook [*.PST]
any reason why I keep getting:
[0x080000] Include pattern skipped because enumeration root is not present
“C:\ Users\ loginID\ AppData\ Roaming\ Microsoft\ Windows\ Recent\ AutomaticDestinations\* [*] ”
When trying to migreate quick access items in Windows10.
Hello, I am migrating from a workgroup to a domain for about 40 users. AD is setup and working fine. However the The local username is different from the new AD Logon Username.
IE;
Local username: Paula
New AD login Name: Pflintstone
Can I still migrate the user ? If so what options would i use to do this?
Thanks and have a great day!