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:
Here are screenshots of each of the three keys:
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.
There is one additional attribute to look at and that is a pending reboot via the configuration manager client. It is the following:
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.