Windows Management User Group

ConfigMgr 2012 OSD Installing Package Hangs

By Erik Verwer

SMS_Maintenancetask

Deploying a captured image hangs at the first install package step when you start the OSD deployment just after you update the Distribution Point with the caputered image. The strange thing is that when you wait for 12hours the deployment will work fine.

In the smsts.log you will find repeatedly;

When searching the web i found a request for help on the Technet Forum. It seems to be a bug and has not been fixed in ConfigMgr 2012 CU1, CU2 or CU3.
Link to the Technet Forum: http://social.technet.microsoft.com/Forums/en-US/54a01410-ebe5-4bba-8f62-01415a6dac7a/tasksequence-stops-randomly

Happely there is a fix that came from a support call with Microsoft.
The fix delete a Maintenance Taks which has a “MaxRunTime” of 43200 seconds what is 12hours. See the below image:

Just put this Visual Basic Script or PowerShell Command Line in your Build and Capture Task Sequence before the step “Capture the Reference Machine”. Or you can add the script in your deploy Task Squence just before your first Install Package step.
In my case i added it in the B&C Task Sequence like the below image.

Visual Basic Script
strComputer = “.” Set objSWbemServices = GetObject(“winmgmts:” & strComputer & “rootccm”)
Set colSWbemObjectSet = objSWbemServices.InstancesOf(“SMS_MaintenanceTaskRequests”)
For Each objSWbemObject In colSWbemObjectSet
strInstance = “SMS_MaintenanceTaskRequests.TaskID=’”&objSWbemObject.TaskID&”‘”
objSWbemServices.delete strInstance
Next

PowerShell Command Line (thanks …read more

Read more here:: Techready