Share via

User State Migration Tool

Hakim Ismail 0 Reputation points
2026-06-23T05:38:13.1833333+00:00

Our desktop team is migrating 50 offline machines from an isolated local network over to a new system. We cannot use cloud backup. How do we Use the command-line User State Migration Tool (USAMT) to capture all user profiles, local files, and registry settings into a encrypted migration store file.

Thank you in advance.

Windows for business | Windows 365 Business
0 comments No comments

2 answers

Sort by: Most helpful
  1. Jason Nguyen Tran 20,435 Reputation points Independent Advisor
    2026-06-23T06:42:30.0866667+00:00

    Hi Hakim Ismail,

    With USMT, you’ll use two main command-line utilities: scanstate.exe to capture user profiles, files, and registry settings, and loadstate.exe to restore them on the new system. The key is to run scanstate on each source machine to create an encrypted migration store file, then transfer that file via your external drive to the target machine.

    For example, you can run a command like: scanstate D:\MigrationStore /i:migapp.xml /i:migdocs.xml /i:miguser.xml /encrypt /key:YourStrongKey /o This captures application settings, documents, and user profiles into an encrypted store on your external drive. The /encrypt and /key switches ensure the migration file is protected. Once you’ve moved the store to the new system, you run loadstate with the same key to restore everything.

    Best practice is to test the process on a small set of machines first to confirm that all required files and settings are captured. Also, make sure you’re running the commands with administrative privileges and that the external drive has enough space to hold the migration store. Since you’re working in an isolated environment, double-check that the USMT version matches the Windows build you’re migrating to, as mismatches can cause errors.

    If you find this answer helpful, kindly hit “accept answer”.

    Jason.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-06-23T05:38:32.04+00:00

    Below is a concise, USMT-only, offline-friendly approach to capture all user profiles, local files, and settings into an encrypted migration store for later restore on the new systems.

    1. Plan the migration and storage location
      • Decide the migration type: for isolated/offline machines, use an offline migration with WinPE or from a previous Windows.old installation if applicable.
      • Decide where to store the migration data (for example, a removable drive or a file share reachable from the isolated network).
      • For each source PC, create a unique folder for its migration store, e.g. D:\USMTStores\PC001.
      • Determine what to migrate (all user profiles, OS settings, app settings, files). USMT uses XML rules (MigDocs.xml, MigApp.xml, MigUser.xml) to control this.
    2. Prepare and customize USMT XML (optional but recommended)
      • Use /GenMigXML with ScanState.exe to see what will be included and adjust if needed.
      • If custom rules are required (for example, include/exclude specific folders), copy and modify the provided XML files instead of editing the originals, and/or create custom XML files.
      • Use Config.xml to exclude specific files or settings if needed.
    3. On each source (old) computer: collect files and settings with ScanState Prerequisites:
      • Back up the source computer.
      • Close all applications (especially Outlook, browsers, etc.) so USMT can capture all files (for example, PST files).
      • Sign in with an account that can run an elevated command prompt.
      Steps:
      1. Open Command Prompt as Administrator: right-click Command PromptRun as administrator.
      2. Run ScanState.exe pointing to the migration store path and XML files, with encryption. Example:
              ScanState.exe D:\USMTStores\PC001\Store /config:Config.xml ^
                /i:MigDocs.xml /i:MigApp.xml /i:MigUser.xml ^
                /encrypt /key:"YourStrongEncryptionKeyHere" ^
                /v:13 /l:D:\USMTStores\PC001\ScanState.log
        
        Notes:
        • Replace D:\USMTStores\PC001\Store with the actual path (local or network) where the migration store should be written.
        • Include all XML files needed (MigDocs.xml, MigApp.xml, MigUser.xml, and any custom XML).
        • Use /config:Config.xml if a Config.xml file is used to exclude items.
        • Use /encrypt with /key: or /keyfile: to create an encrypted migration store.
        • Use /c if the migration should continue even when some files are locked, and then review the log for skipped items.
      3. After ScanState completes, verify the store is not corrupted:
              UsmtUtils.exe /verify D:\USMTStores\PC001\Store
        
    4. Move the encrypted migration store to the new environment
      • Physically transport the removable media or otherwise move the Store folder(s) to the new system or to a location accessible from the new system.
    5. On each destination (new) computer: restore with LoadState
      • After the new Windows installation is ready, use LoadState.exe with the same XML and encryption key to restore user profiles, files, and settings. (Syntax is analogous to ScanState, but uses LoadState.exe and the same store path and key.)
    6. If needed, extract individual files from a compressed store
      • If only specific files are needed from a compressed migration store, use UsmtUtils.exe /extract. Example:
             UsmtUtils.exe /extract D:\USMTStores\PC001\Store\store.mig C:\ExtractedStore ^
               /decrypt /key:"YourStrongEncryptionKeyHere"
        
      • Use /i: and /e: patterns to include or exclude specific file types.

    This process can be repeated for all 50 offline machines by scripting ScanState.exe and UsmtUtils.exe calls and standardizing the store paths and keys.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.