Scastate not backing up data in redirected folders when ran remotely on a system using psexec RRS feed

  • Question

  • Hi,

    We are unable to take backup of "Favorites","Desktop" folders in a user profile when scanstate is run remotely using "Psexec \\computername -s scanstate.exe /ue:*\* /ui:domain\user /i:miguser.xml /config:config.xml /c" command. These folders are redirected to a shared folder on a server and when we try to see the folders by using UNC path(\\computername\c$\users\username) on the user's machine they dont appear under user profile. Even though "Documents" are redirected, we are able to take backup of the "Documents" folder.

    However, when scanstate is run locally on the system, all folders are backedup to usmt.mig file. We are using "miguser.xml" and "Config.xml" for scanstate, since we need backup of "Documents","Desktop" and "Favorites" only. After searching over internet, we doubt that, this behavior has got something to do with "Shell Folders" and "User Shell Folders" in the registry under "HKCU\Software\Microsoft\Windows\Currentversion\explorer\shell folders", where paths to all user profile related folders information is stored. We dont find "Documents" folder there, may be thats the reason why we are able to take backup of only "My Documents" and not the rest of the folders (Favorites,Desktop). When scanstate is run locally, the backup of "Favorites","Desktop" and "Documents" is backed up to a location in the form of (Domainname\server share\user profile) where these folders are redirected to. So, my question is, is there a way to mock the scanstate via psexec as if its running on the local system. Please note, we tried all possible ways of running scanstate.exe from remote share and also by copying the USMT files locally then running scanstate from there using PSEXEC remotely.

    Wednesday, January 16, 2019 9:36 AM

All replies

  • >>is there a way to mock the scanstate via psexec as if its running on the local system.

    Sorry, I don’t know a way to make it. Just find out this case, maybe can give you a hint

    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Thursday, January 17, 2019 3:06 AM
  • Hi Teemo,

    Thanks for your reply! I tried it and its failing in the beginning itself, as scanstate is looking for miguser.xml and config.xml in C:\windows\system32 when psexec was run with -s parameter from command prompt. If I give my domain admin credentials its unable to create USMT folder in the store path, even though my ID has access to the share:). Moreover, we are trying to run psexec using powershell's start-process on our server by having users and computers in two list boxes. We also tried with different combinations of config.xml rules but the result remains the same. Seems like Scanstate likes to run locally on the system and takes backup of all folders even though they are redirected and does not take Desktop and Favorites folders backup remotely, no matter what we do. This behavior to me is something to do with how scanstate or psexec deals with shell folders. Winrm is not enabled in our environment and hence we had to take psexec approach.

    Another important factor is that, the data backed up by using remote psexec execution of scanstate does not restore the profile when we try to run loadstate by logging on to the machine locally and throws error saying, Win32 api can not be accessed and complains about the backup being incomplete and Ntuser.dat. Its all weird as of now. :(

    Thursday, January 17, 2019 8:43 PM