Skip to content

This is a .bat wrapper for remote user profile backup and restore utilizing User State Migration Tool (USMT).

Notifications You must be signed in to change notification settings

RedNeckGamer88/USMTwrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

User Migration Tool Wrapper 3.4

Overview

This script facilitates backing up and restoring user profiles remotely using USMT and PsExec. It includes privilege escalation handling, error checking, and automated retries.

Prerequisites

Features

  • Elevates privileges via UAC prompt.
  • Backs up user profiles from a remote machine.
  • Restores user profiles to a new machine.
  • Closes remote migration processes.

Usage

Running the Script

Run the batch script as an administrator. 
Choose an option: 
(1) Backup Profile 
(2) Restore Profile 
(3) Close a Remote Migration Process 

Backup Process

  • Enter the name or IP address of the PC to back up.
  • Select the user profiles to back up.
  • The script will:
  • Check connectivity.
  • Generate a remote backup script.
  • Execute scanstate.exe remotely.
  • Clean up temporary files.

Restore Process

  • Enter the name or IP address of the destination PC.
  • Select the user profiles to restore.
  • The script will:
  • Check connectivity.
  • Generate a remote restore script.
  • Execute loadstate.exe remotely.
  • Clean up temporary files.

Closing Remote Migration Processes

  • Enter the name or IP address of the target PC.
  • The script will terminate scanstate and loadstate processes remotely. (this really only needs to be done if the scanstate.exe or loadstate.exe are stuck or you want to cancel them.)

Error Handling

  • The script checks for network availability before proceeding.
  • If authentication fails, it retries automatically.
  • Logs are generated in the profile save location for debugging.

Notes

  • Modify the domain name and paths as needed before running the script.

Author

RedneckGamer88

Last updated: 02/26/2025