Difference between revisions of "USMT from Command Line"

From ASU HOWTO
Jump to: navigation, search
(USMT from Command Line)
(USMT from Command Line)
(6 intermediate revisions by the same user not shown)
Line 23: Line 23:
 
When an OS already exists (computer has already been cloned) you can use the command line to restore the files without reimaging the computer.  
 
When an OS already exists (computer has already been cloned) you can use the command line to restore the files without reimaging the computer.  
  
#Open an elevated command prompt.  
+
#Close all applications, Open an elevated command prompt.  
 
##You must use credentials that have rights to SRVCM1 and SRVDP1 (tecadmin account)  
 
##You must use credentials that have rights to SRVCM1 and SRVDP1 (tecadmin account)  
#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.
+
#Copy the following command into the command prompt. Make sure to change COMPUTERNAME to the computer name of the computer you are backing up (DO NOT KEEP %'s).
 
##For x64 systems  
 
##For x64 systems  
###"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\scanstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\ASUCustomMig2017.xml" /ue:*\* /ui:AD\<user>
+
##To backup all profiles on a machine (everyone who has logged in within 90 days) - COPY ENTIRE STRING, PASTE INTO ELEVATED COMMAND PROMPT:
##For x32 systems
+
###"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\scanstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\ASUCustomMig2017.xml" /ue <!--l:90 /v:4-->  
###"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\x86\scanstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\x86\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\x86\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\x86\ASUCustomMig2017.xml"<br> /ue:*\* /ui:AD\<user>
+
##To backup a specific user's profile - COPY ENTIRE STRING, PASTE INTO ELEVATED COMMAND PROMPT:
 
+
###"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\scanstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\ASUCustomMig2017.xml" ue:*\* /ui:AD\<username> <!--/v:4-->  
#The restore uses the same command line, with the exception of using the loadstate.exe utility instead of scanstate.exe.  
+
#The restore uses the same command line, with the exception of using the loadstate.exe utility instead of scanstate.exe. - COPY ENTIRE STRING, PASTE IN ELEVATED COMMAND PROMPT.  
 
##For x64 systems  
 
##For x64 systems  
###"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\loadstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\ASUCustomMig2017.xml"  /c /lac
+
###"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\loadstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\ASUCustomMig2017.xml"  /c /lac /v:4
##For x32 systems
+
 
###"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\x86\loadstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\x86\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\x86\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\x86\ASUCustomMig2017.xml" /c /lac
+
  
  

Revision as of 10:43, 8 October 2019

USMT from Software Center

We are now able to successfully back up a computer through the Software Center. To do so you will first go to software center and find xxxx-Employee USMT Capture - CS Techinicians-xxxx

After selecting and beginning the download the user will be asked to verify that they want to install on operating system click yes and the download will continue until you get a UDI performing checks before booting into WinPE.

CaptureUDIWin.JPG

There is nothing to change in this Wizard simply click next until the Finish button is able to be selected and boot into WinPE.

After booting into WinPE you will got another UDI. The default is that it wants to restore to a USB Target Drive, but we want the Network radio button to be selected as in the picture.

CaptureUDIPE.JPG

The user will then hit next and this is the point that they can leave their computer. Depending on how much data their is to capture will determine how long USMT runs. When the owner of the computer returns they will hit next and finished the UDI Wizard. This will run a script that changes the name of the save location on \\srvdp1\UDIUSMT to the old computer name so that we can restore easily via command line which is detailed below.


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. Close all applications, 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 (DO NOT KEEP %'s).
    1. For x64 systems
    2. To backup all profiles on a machine (everyone who has logged in within 90 days) - COPY ENTIRE STRING, PASTE INTO ELEVATED COMMAND PROMPT:
      1. "\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\scanstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\ASUCustomMig2017.xml" /ue
    3. To backup a specific user's profile - COPY ENTIRE STRING, PASTE INTO ELEVATED COMMAND PROMPT:
      1. "\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\scanstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\ASUCustomMig2017.xml" ue:*\* /ui:AD\<username>
  3. The restore uses the same command line, with the exception of using the loadstate.exe utility instead of scanstate.exe. - COPY ENTIRE STRING, PASTE IN ELEVATED COMMAND PROMPT.
    1. For x64 systems
      1. "\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\loadstate.exe" \\srvscfs\UDIUSMT\%COMPUTERNAME% /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\MigApp2015.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\migdocs.xml" /i:"\\srvscfs\OSD\USMTconfig\Employee\Employee 6-14-16\USMTpackage\amd64\ASUCustomMig2017.xml" /c /lac /v:4


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:MigApp2015.xml /i:migdocs.xml /i:ASUCustomMig2015.xml \\srvdp1\UDIUSMT\FOLDERNAME