20 December 2008

ConfigMgr: Manually trigger auto-provisioning of vPro machine

I bumped into this whilst playing with Out of Band Management in ConfigMgr2007 SP1. My vPro machine just couldn't get provisioned by my ConfigMgr server. I was reading through the logs and the provisioning task failed once and did not resume even I ran the Refresh Machine Policy from my client.

Then my good friend from Intel
Paul Haines and Ow Haw Kuang shared with me that the auto-provisioning only executes every 24 hours but then you can still trigger it manually using WMI to force the provisioning task.

This topic is covered in the following link:
http://communities.intel.com/community/openportit/vproexpert/microsoft-vpro/blog/2008/10/01/using-wmi-to-force-the-sccm-agent-to-check-for-its-amt-auto-provisioning-policy

I did the simple method of copying the following code into a vbs file and running it from the client machine and it works !

Option Explicit
Main
Sub Main()
Dim oLocator
Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Dim oServices
Set oServices = oLocator.ConnectServer( , "root\ccm\policy\machine\actualconfig")
Dim oObjectSet
Set oObjectSet = oServices.InstancesOf("CCM_OutOfBandManagementSettings")
Dim oObject
For Each oObject In oObjectSet
Wscript.Echo "Name: " & oObject.AutoProvision
oObject.AutoProvision = False
oObject.Put_
WScript.Sleep 500
Wscript.Echo "Name: " & oObject.AutoProvision
oObject.AutoProvision = true
oObject.Put_
Next
End Sub