This is the last in a series of articles about Task Sequence Step Conditions. For those not frighted away by the title, I’ve simplified it as much as I can.. We’re going to use the WMI Query Language (WQL) to make our Task Sequence Step query based conditions as opposed to just using simple variables.
You may need to use this technique when you come across a situation where MDT does not have a suitable variable(very rare). For this I’ve concocted an issue to tackle.
Now, to begin with we need to look at an example of a WQL query statement. In the MDT documentation this is a WQL example showing the correct syntax.
Select * From Win32_ComputerSystem WHERE Model LIKE "%Dell%%1950%"
Now, back to the problem. The scenario is you want to install DVD writing software but only on machines that have DVD Writers installed. You have a task sequence step that installs the software and but you want to add a condition to it.
As for the solution, This example shows how to use the WMI Code Creator tool to generate the WQL statement.
- Select the Win32 class.
- Select the desired property.
- Select a value to isolate the query.
- Copy the query statement.
Next, in MDT open the Task Sequence and edit the Task Sequence Step. On the Options tab select Query WMI.
Paste in your query statement and click OK.
This step will now only run on computers with DVD writers installed.