I was recently called to investigate an issue with failed client installations on newly imaged Windows 10 machines. The symptoms were as follows:
- Opening Configuration Manager from the Control Panel of the affected computer is missing tabs. Typically only the General, Components, Actions, Site, Cache, and Network tabs are displayed.
- The tabs that are displayed in Configuration Manager on the computer are incomplete as well.
- The registry key HKLM\Software\Microsoft\CCM\CcmExec\ProvisioningMode is set to True
Why was this happening?
When the client is installed during an OSD Task Sequence, it is set to Provisioning Mode to prevent it from processing new policy requests until the task sequence has finished. It seems that if there is a reboot step that executes before the client is ready, or a reboot using ‘shutdown.exe /f /t <xx>’ that doesn’t give the client enough time to complete the action it is working on the client can get stuck in this mode. In our case, it was a reboot step that someone had inexplicably added just after the “Setup Windows and ConfigMgr” step.
How do I get out of this mess?
Many blogs proposed a solution of changing the ProvisioningMode registry key to false and reinstalling the client or even adding a “Run Command Lines” step to the task sequence to force the value. While this seemed to work OK initially, it discouraged by Microsoft and not supported. As mentioned in the “More Information” section of KB2894518, changing the registry value will not fully take the client out of provisioning mode.
The correct way to remove the client from provisioning mode is to use the Invoke-WMIMethod PowerShell commandlet:
Invoke-WmiMethod -Namespace root\CCM -Class SMS_Client -Name SetClientProvisioningMode -ArgumentList $false
Of course, the actual solution is to not get stuck in Provisioning Mode at all. Review any reboots that are happening during your task sequence to help prevent this…especially reboots happening from a script or command line step.