ZTIMoveStateStore.wsf does not move the StateStore folder during Refresh

When ConfigMgr 2012 is integrated with MDT 2012, the Client Task Sequence template includes a step that uses ZTIMoveStateStore.wsf to move the StateStore folder to WINDOWS\TEMP in the event of success or failure, however this script has not been updated to cater for the new location of the StateStore and when it runs it will simply not find the StateStore in the expected location and exit without any error.  This isn’t too much of a problem until you attempt a second refresh of a system -which will result in the Task Sequence failing to store the user state.

To rectify this, create a backup copy of the ZTIMoveStateStore.wsf script within the MDT Toolkit Files package and then open the original for editing.  You will be looking for any references to “oUtility.LocalRootPath” and replace these with “oUtility.StatePath” and remove the additional path.  There are 6 (SIX) lines to which this amendment needs to be made;

– 1 –

If oFSO.FolderExists(oUtility.LocalRootPath & "\StateStore") Then


If oFSO.FolderExists(oUtility.StatePath) Then

– 2 –

oLogging.CreateEntry "Moving " & oUtility.LocalRootPath & "\StateStore" & " to " & sArchiveDir & "\StateStore", LogTypeInfo


oLogging.CreateEntry "Moving " & oUtility.StatePath & " to " & sArchiveDir & "\StateStore", LogTypeInfo

– 3 –

oFSO.MoveFolder oUtility.LocalRootPath & "\StateStore", sArchiveDir & "\StateStore"


oFSO.MoveFolder oUtility.StatePath, sArchiveDir & "\StateStore"

– 4 –

oLogging.CreateEntry "Error moving " & oUtility.LocalRootPath & "\StateStore" & " to " & sArchiveDir & "\StateStore: " & Err.Description & " (" & Err.Number & ").  Trying to copy", LogTypeWarning


oLogging.CreateEntry "Error moving " & oUtility.StatePath & " to " & sArchiveDir & "\StateStore: " & Err.Description & " (" & Err.Number & ").  Trying to copy", LogTypeWarning

– 5 –

OFSO.CopyFolder oUtility.LocalRootPath & "\StateStore", sArchiveDir & "\StateStore"


OFSO.CopyFolder oUtility.StatePath, sArchiveDir & "\StateStore"

– 6 –

oLogging.CreateEntry "Error Copying " & oUtility.LocalRootPath & "\StateStore" & " to " & sArchiveDir & "\StateStore: " & Err.Description & " (" & Err.Number & ").  Trying to copy", LogTypeWarning


oLogging.CreateEntry "Error Copying " & oUtility.StatePath & " to " & sArchiveDir & "\StateStore: " & Err.Description & " (" & Err.Number & ").  Trying to copy", LogTypeWarning


This has worked great for me.


MDT 2012 Update 1: Missing “Request State Store” step causes state restore to fail from State Migration Point in REPLACE Scenario.

I have found that the MDT 2012 Update 1 Client Task Sequence Template is now missing a crucial step in the later stages of the task sequence which is needed to restore captured data from the ConfigMgr State Migration Point when working under the REPLACE scenario – and we need to add this back in.

You simply need to add a “Request State Store” step just above the new “Connect to State Store” step (which looks to just do an authentication against UNC path) and add a condition on the step to run only if Task Sequence Variable “USMTLOCAL” not equals TRUE.

Also add a “Release State Store” step below the “Restore User State” task, again with the same condition as above.


ConfigMgr State Migration Point Error: Health check request failed, status code is 500, ‘Internal Server Error’.

I encountered a problem earlier this week provisioning a new ConfigMgr 2012 environment with a State Migration Point (SMP).  I am used to just installing the SMP role and pointing it at a drive letter to use and letting it create the folder structure it needs.  However, I think there may be an issue with ConfigMgr 2012 with this method as it seems to want to modify the permissions of the folder that you specify, and if this happens to be the drive root then we see some problems.

When attempting to install the SMP role and specifying the drive root as a target, the SMPMGR.LOG records the following errors continually;

Call to HttpSendRequestSync failed for port 80 with status code 500, text: Internal Server Error
Health check request failed, status code is 500, 'Internal Server Error'.

What seems to happen is that the SMP role setup routine modifies the permissions of the target folder and now has insufficient permissions to create the necessary MigrationStatus folder within the SMPSTOREF_12345678$ folder.  This issue does not occur if you use the drive root which ConfigMgr is installed on as a target, weird.

So in summary, you must create a sub-folder (maybe called SMP or SMSSMP) on the drive you intend to use for your SMP role and use that path as the target, never the drive root itself.


Well I didn’t know that! State Migration Point USMT.MIG files and Windows Easy Transfer.

I get a nice warm feeling inside when I accidentally click on something but get rewarded with a new little piece of knowledge.  This recently happened when I was browing the ConfigMgr State Migration Point store from a Windows 7 system, double clicked on a USMT.MIG file, and was introduced to Windows Easy Transfer.  I’ll admit to having heard of Easy Transfer but considering myself as more of an enterprise solution implementer nowadays I didn’t give it much consideration and dismissed it as a ‘Home User’ type of thing.  I was wrong.

I am often asked the question of how best to restore previously captured User State data from a ConfigMgr State Migration Point should ‘something’ go wrong – for instance if the State Restore during OSD should fail.  My previous answer used to suggest the use of the command line and the USMT LoadState.exe – but now my answer now is simply “Use Easy Transfer.”

You can browse to your SMP using a Windows 7 system and double click on the USMT.MIG file created by the State Capture phase of your task sequence to start using Easy Transfer…

You are required to enter a recovery password…

The recovery password can be found by viewing the ‘Recovery Information’ of the Computer Association object that was created within the ConfigMgr console and it is the ‘User State Recovery Key’ you are interested in…

Use this key as the password for the Easy Transfer Wizard and continue…

Well this interface is a darn sight easier to use than the USMT command line!  The ‘Advanced Options’ give you some control over mapping migrated data to other user accounts.  Hit the ‘Transfer’ button…

Once the transfer is complete, you will be presented with a summary screen from which you can choose to view extended details and reporting data on what exactly was transferred…

Marvellously simple – and much, much better than having to either manually initiate USMT LoadState.exe or advertise and run a Task Sequence just to perform a restore.