USMT from Command Line

Revision as of 16:11, 13 June 2014 by Cherneskim ws (Talk | contribs)

Jump to: navigation, search

USMT from Command Line

Ideally, the USMT UDI task will be run from the Software Center in windows. This will ensure the UDI wizard is used. For those cases where that is not an option (such as the Configuration Manager client not installed or corrupt) you can run the task from command line.

NOTE: When you back up a computer via command line you must use the command line to restore it. If you use the UDI wizard to back up the computer, you can use either the UDI wizard or command line to restore the files. If you are using cmd line to restore a state store that the UDI wizard backed up, you may want to rename the store to the computername (rather than the long, randomly generated folder name) to make it easier to type in at the command prompt.

When an OS already exists (computer has already been cloned) you can use the command line to restore the files without reimaging the computer.

  1. Open an elevated command prompt.
    1. You must use credentials that have rights to SRVCM1 and SRVDP1 (tecadmin account)
  2. Copy the following command into the command prompt. Make sure to change COMPUTERNAME to the computer name of the computer you are backing up. You must use the appropriate command for x86 vs x64 systems.
    1. For x64 systems
      1. "\\srvcm1\osd\USMT\Employee 6-6-14\USMTpackage\amd64\"scanstate.exe \\srvdp1\UDIUSMT\%COMPUTERNAME%

/i:\"\\srvcm1\osd\USMT\Employee 6-6-14\USMTpackage\amd64\migapp.xml" /i:"\\srvcm1\OSD\USMT\Employee-6-6-14\USMTpackage\amd64\migdocs.xml" /i:\\srvcm1\OSD\USMT\Employees\USMTpackage\amd64\asucustommig.xml

    1. For x32 systems
      1. "\\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\x86\scanstate.exe" \\srvdp1\UDIUSMT\%COMPUTERNAME% /i:"\\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\x86\migapp.xml" /i:"\\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\x86\migdocs.xml" /i:"\\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\x86\asucustommig.xml"
  1. The restore uses the same command line, with the exception of using the loadstate.exe utility instead of scanstate.exe.
    1. For x64 systems
      1. \\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\amd64\loadstate.exe \\srvdp1\UDIUSMT\%COMPUTERNAME% /i:\\srvcm1\OSD\USMT\Employees\USMTpackage\amd64\migapp.xml /i:\\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\amd64\migdocs.xml /i:\\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\amd64\asucustommig.xml
    2. For x32 systems
      1. \\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\x86\loadstate.exe \\srvdp1\UDIUSMT\%COMPUTERNAME% /i:"\\srvcm1\OSD\USMT\Employees\USMTpackage\x86\migapp.xml" /i:"\\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\x86\migdocs.xml" /i:"\\srvcm1\OSD\USMT\Employee 6-6-14\USMTpackage\x86\asucustommig.xml"

If you run the command from within the USMT folder you will not have to put in the full path to the server, and the command is as follows. Use this if you copied the state store to a flash drive, for example.

scanstate.exe /i:migapp.xml /i:migdocs.xml /i:asucustommig.xml \\srvdp1\UDIUSMT\FOLDERNAME