Scripting Question

Does anyone have a work around for using USMT with a RSA?

05/06/2014 4331 views

I am trying to setup a task as described here http://blog.kace.com/2013/02/20/k2000-kloser-look-capturing-profiles-to-an-external-store/ but am getting stuck where it copies "y:\applications\4\usmt4\%PROCESSOR_ARCHITECTURE%" because I cannot find the "4" folder.  I realize that "4" is the application ID, and my USMT task ID is 46 but that's not found in y:\applications.  Has anyone successfully done this or is there a better way to capture a user profile a a pre-task while imaging from a RSA?

Answer Summary:
3 Comments   [ + ] Show comments


  • do you have a k1000?
    • I am out of here for the day but I have k1000 scripts to capture and deploy the mig file for imaging. If you want I can post them when I get in tomorrow morning. I have one's that aquire and deploy automatically and one's that acquire and put the mig file in sub dir named after the machine.
      • I'm happy you replied to my question! I was looking at your solution here http://www.itninja.com/question/what-s-the-best-way-to-use-the-usmt-with-a-remote-site yesterday as I was working on this. I was able to get the capture pre-task working before the end of the day. Today's job will be getting deploy to work. You're input will greatly be appreciated as I work on this.
      • this is the deploy mig task I use. My script copies the usmt files to the share I store the wims on so that is why you see drive v:. This would work with the get/apply computer name really well.
        I am looking at the get computername task and it looks I can modify this to create a subdir with the computer name to store the mig file in. post you pretask I can probably incorporate that into the vb script as well.
        the post script command to apply a mig would be
        for 64 bit:
        v:\usmt\amd64\loadstate v:\usmt\%COMPUTERNAME% /i:v:\usmt\amd64\migapp.xml /i:v:\usmt\amd64\miguser.xml /l:v:\usmt\%COMPUTERNAME%\mig.log /v:5 /uel:120 /ui:tmccadmn\*
        for 32 bit:
        v:\usmt\x86\loadstate v:\usmt\%COMPUTERNAME% /i:v:\usmt\x86\migapp.xml /i:v:\usmt\x86\miguser.xml /l:v:\usmt\%COMPUTERNAME%\mig.log /v:5 /uel:120 /ui:tmccadmn\*
      • My pre-task to capture:

        net use S: \\server\share /user:username password




        scanstate S:\USMT\%MAC_ADDRESS% /offlinewindir:c:\windows /all /i:migapp.xml /i:miguser.xml /o /progress:S:\USMT\%MAC_ADDRESS%\proglog.txt /v:13 /l:S:\USMT\%MAC_ADDRESS%\scanlog.txt

        net use S: /delete

        This seems to copy the profiles to a MIG file successfully. My post-task that I've been working on this morning:

        net use S: \\server\share /user:username password

        loadstate S:\USMT\%MAC_ADDRESS% /i:migapp.xml /i:miguser.xml

        net use S: /delete

        LoadState doesn't work. The XML files are not on the server with the MIG file so I don't know why they're missing or where to find them.

        EDIT: I just realized that I'm using loadstate but don't have the file available. I'll modify my post-task and see if that fixes it.
      • well did not think of pulling the mac for the directory, the post task for you would be:
        for 64bit"
        s:\usmt\amd64\loadstate s:\usmt\%MAC_ADDRESS% /i:s:\usmt\amd64\migapp.xml /i:s:\usmt\amd64\miguser.xml /l:s:\usmt\%MAC_ADDRESS%\mig.log /v:5 /uel:120 /ui:domainname\*
        for 32 bit:
        v:\usmt\x86\loadstate v:\usmt\%MAC_ADDRESS% /i:v:\usmt\x86\migapp.xml /i:v:\usmt\x86\miguser.xml /l:v:\usmt\%MAC_ADDRESS%\mig.log /v:5 /uel:120 /ui:domainname\*
      • I'm still not clear on the XML file. In the pre-task I'm copying the USMT files to the C drive and running scanstate from there. D I need to copy the XML files from the C drive to the server before the disk is formatted for imaging? Your latest example shows loadstate accessing the XML files from the server so I'm a bit confused.
  • Yes
  • The patch for preinstallation payloads is now \\k2000\peinst\preinstall\##

    So for that line, the path will be


    if you are using the latest version of USMT. The alternative would be to use the K1000 to run scanstate.exe with the Scripting module.
    • I've seen people using K1000 but I'm hoping to eliminate steps and have profiles captured on the fly as a pre-task. Eliminating steps is crucial to getting remote imaging accepted by staff at my office.

Community Chosen Answer


I was able to get this to work with the help of SMal.tmcc.  I have written a blog describing what I've done.  You can view it here http://www.itninja.com/blog/view/using-user-state-migration-tool-with-a-kace-k2000-remote-site-appliance


Answered 05/19/2014 by: kcorrie
Senior Purple Belt

All Answers


the best thing to do is not copy your scanstate to c:, just run it from the s: share.  What I did was copy the usmt structure from my tech station with the waik installed to the share.

Aquire MIG

net use S: \\server\share /user:username password


cd usmt


S:\usmt\%PROCESSOR_ARCHITECTURE%\scanstate S:\USMT\%MAC_ADDRESS% /offlinewindir:c:\windows /all /i:migapp.xml /i:miguser.xml /o /progress:S:\USMT\%MAC_ADDRESS%\proglog.txt /v:13 /l:S:\USMT\%MAC_ADDRESS%\scanlog.txt

net use S: /delete

Deploy MIG

net use S: \\server\share /user:username password

s:\usmt\%PROCESSOR_ARCHITECTURE%\loadstate s:\usmt\%MAC_ADDRESS% /i:s:\usmt\%PROCESSOR_ARCHITECTURE%\migapp.xml /i:s:\usmt\%PROCESSOR_ARCHITECTURE%\miguser.xml /l:s:\usmt\%MAC_ADDRESS%\mig.log /v:5 /uel:120 /ui:domainname\*

net use s: /delete

the /ui:domainname\* only puts back the domain users not the local users.

Answered 05/07/2014 by: SMal.tmcc
Red Belt

  • I had originally run it from my server but I noticed the files disappeared from the server after the task was run. I then looked at the blog I link in the original question and noticed it copied the files to the C drive so I figured that was standard practice.
    • I see the part I missed in your acquire pre task create a directory with the mac and then the files will go a separate directory instead of over writing them with the next run. I edited the answer to add this
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ