How to Migrate User Profiles with User State Migration Tool (USMT) on Windows 10?

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, 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 the same as they were on the source system.

Hint. USMT migrates application settings but does not migrate the applications themselves. For applications to work correctly, you will have to install them on the target computer.

Migrating User Profiles Using USMT

The latest currently available version of USMT 10 allows you to migrate user’s settings and profiles and apply settings from operating systems starting from Windows 7 and up to Windows 10. 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 operating system). If you want to use USMT on legacy 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 the source computer, run adksetup.exe file and select User State Migration Tool (USMT) to install:

usmt

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 command-line programs scanstate.exe and loadstate.exe, as well as a set of XML files describing the process of collecting and applying settings.

READ ALSO  Fixing Windows 10 Automatic Repair Loop

Both tools must be run under an account with local administrator permissions.

user state migration tool

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.

Hint. A separate tool EnbUSMTUtils.exe is used to remove the local migration store.

USMT 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.

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.

Note. From Windows 10 1607, USMT can’t migrate the start menu layout. Instead, you must use Export-StartLayout and Import-StartLayout PowerShell cmdlets.

The USMT utility creates 4 migration files (in .XML format) that store rules for migrating various kinds of data:

  1. MigApp.xml — contains rules for transferring users’ data;
  2. MigUser.xml — contains rules for transferring users’ profiles;
  3. MigDocs.xml — document transfer rules;
  4. Config.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

usmt windows 10

The following data in the user profile is migrated by default:

  • Standard directories from the user’s profile: Documents, Video, Music, Pictures, Desktop, Start menu, Quick Launch settings, Favorites;
  • File types: accdb, .ch3, .csv, .dif, .doc*, .dot*, .dqy, .iqy, .mcw, .mdb*, .mpp, .one*, .oqy, .or6, .pot*, .ppa, .pps*, .ppt*, .pre, .pst, .pub, .qdf, .qel, .qph, .qsd, .rqy, .rtf, .scd, .sh3, .slk, .txt, .vl*, .vsd, .wk*, .wpd, .wps, .wq1, .wri, .xl*, .xla, .xlb, .xls*.
READ ALSO  Moving a OneNote Notebook from SharePoint to Office 365

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

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.

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%\*

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 /key:"StR0n51"

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.

Also, you can use USMT to perform offline profile migration. Boot your computer into the Windows РЕ 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

Another interesting way to use the USMT is to perform a backup of users’ profiles on some critical computers.

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.

READ ALSO  What is DHCP Lease Time?

To load all profiles on a source computer from the store created earlier, run:

loadstate \\fs1\migr\userdata /i:miguser.xml /i:migapp.xml

Hint. Please note that you should not logon to the computer under a new user before migrating his profile via loadstate.exe. If this user already exists on the computer, then when restoring the profile, the LoadState error return code: 71 will appear. In this case, you need to delete the user’s profile in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.

If you want to transfer a user’s profile and move a user from one domain to another:

loadstate \\fs1\migr\userdata /mu:/ui:corpuser:/ui:corp2user /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.

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:

scanstate \\fs1\migr\mystore1 /i:migapp.xml /i:migapp.xml /i:miguser.xml /decrypt /key:"StR0n51"

The USMT utility easily integrates with SCCM and MDT. It makes it easier and more automated to move users. The administrator only needs to make preliminary settings, and user migration can be done completely automatically.

Cyril Kardashevsky

5 comments

    1. Hi Jim
      NO :-/ As the main developer of USMTGUI
      I’ve discussed this directly with David James (Chief developer on SCCM at Microsoft) and with main Azure developers numerous times and the answer is the same all over.
      It’s apparently NOT gonna happen.

      What I personally wanted the most was a way to migrate my stuff OUT of there!

      This whole cloud thing makes me more and more seriously worried:
      What will happen when in 10 years we all,GLOBALLY, has handed over ALL our data and ALL our systems to Microsoft, Google, Amazon and Apple. four global businesses?

      Think about that…

  1. Hi
    This is how we did until this Tuesday where our universe took a spin, as I got into contact with Thomas Ehler from Denmark. He runs EhlerTech.com and they produce two extremely nice products :-D

    USMTGUI – simply a really great GUI for USMT
    User Profile Central (UPC) – a central management interface for running USMT remotely.
    With the latter my primary technician has, during ONE day, moved over 50 users from a newly obtained company’s AD to our AD.
    We anticipated this to take weeks but we will have finished the +100 employees well before Monday.

    /Lars – Safe-con.se

  2. bonjour,
    je suis désolé mais je suis en début d’étude d’informatique et je suis nul.
    si j’ai bien compris, pour que je puisse migrer un ordinateur de W7 à W10, il faut que je prenne une clé usb que je copie le chemin dis en dessus et puis que je mette la clé usb sur le pc de l’utilisateur que je veux migrer.
    puis tout simplement double cliquer sur scanstate.exe
    installer W10 puis répéter les actions en cliquant cette fois sur loadstate ???

    svp soyez indulgent …

  3. I’m using USMT to migration Win7 to Win10, and I would like to know how can I move all PST files from each user to another folder on users profile.
    I need to make this cause the machine have many profiles and if the PST files was restored to default Destination (keeped on Documents), when OneDrive will show an error trying to upload the PST files.
    This is the reason that I need to change the files to another folder inside profile.
    Example:
    Original Local -> C:\Users\John\Documents\Outlook
    New Destination -> C:\Users\John\PST

    Thanks

    Luiz Maciel

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.