Adding feature "Desktop Experience" on Windows Server 2012 breaks ConfigMgr Task Sequence – a workaround

If you use System Center ConfigMgr and a OSD task sequence to install Windows Server 2012 and feature Desktop Experience your task sequence will break – even if you install the depending features before (InkAndHandwritingServices and Server-Media-Foundation).

Sample task sequence (doesn’t work):

  1. Add-WindowsFeature InkAndHandwritingServices
  2. Reboot
  3. Add-WindowsFeature Server-Media-Foundation
  4. Reboot
  5. Add-WindowsFeature Desktop-Experience
  6. Reboot
  • Your task sequence breaks here

After adding the Desktop Experience feature the next reboot starts into a Windows Update configuration screen and a “hard” reboot occurs. This hard reboot crashes the hooking of ConfigMgr’s task sequence and your unattended installation stops.

After a couple of hours and analyzing the CBS log (%WinDir%\System32\logs\cbs.log) I observed that the feature Desktop Experience installs a lot of subcomponents which call the service TrustedInstaller that they need a restart, e.g.: Microsoft-Windows-MediaPlayer-Core, Microsoft-Windows-TablePC-Accessories, Microsoft-Windows-Personalization, Microsoft-Windows-Store-Client-UI, etc.

I found a way to avoid this hard reboot:

Sample task sequence (works):

  1. Add-WindowsFeature InkAndHandwritingServices
  2. Reboot
  3. Add-WindowsFeature Server-Media-Foundation
  4. Reboot
  5. Add-WindowsFeature Desktop-Experience
  6. Set-Service -name TrustedInstaller -startupType Disabled
  7. Reboot
  8. Set-Service -name TrustedInstaller -startupType Automatic
  9. Reboot
  10. <…>

What happens?

5. Prepares the feature installation

6. Prevents that the next reboot resumes the configuration (pre-boot phase) of this feature (this step triggers the hard reboot)

7. Configures the first 30% of the feature during the shutdown

8. Prepares Windows to continue the configuration of the feature at the next boot (the last 70%)

9. The next reboot configures the remaining 70% of the feature without the hard reboot