Search
Close this search box.

MVP Monday: Conditional Task Sequence Reboot in SCCM and MDT

MVP Monday: Conditional Task Sequence Reboot in SCCM and MDT

Recently, I built and published the Dell driver update script that may or may not require a reboot. I instituted the script as a task sequence in MDT and then made the following task sequence a reboot. Thinking about it, the reboot may not be required and therefore that would be a waste of time. To get around this, I decided to investigate a conditional reboot.
In order to institute this, I used the standard Restart Computer task sequence and I added conditional parameters to the Options tab shown below:

mvp sccm

Here are screenshots of each of the three keys:

mvp sccm

 

 

registry setting

This was tested by injecting the specified registry keys and these work great. One thing you will encounter when creating these to test just for the existence of the key without a value is a requirement for a value as shown below. I entered a blank space in that field and it worked.

mvp sccm

There is one additional attribute to look at and that is a pending reboot via the configuration manager client. It is the following:
(([wmiclass]”\\.\root\ccm\ClientSDK:CCM_ClientUtilities”).DetermineIfRebootPending()).RebootPending
So far, I have not been able to get this incorporated into a condition using a WQL query. Apparently, you can only use WQL for the class root\cimv2 and no others. I am likely going to have to create an additional task sequence that creates an MDT/SCCM variable with a Boolean value using PowerShell. That is on my list.

Report

The FORRESTER WAVE™: End-User Experience Management, Q3 2022

The FORRESTER WAVE™: End-User Experience Management, Q3 2022