This is one of a series of blog posts showing examples about executing task sequences steps based upon certain deployment conditions. This post shows how to check for a Virtual Machine using conditions within a task sequence.
In the past, one issue I had with MDT was when I tried to deploy an OS on a Virtual Machine, it failed. This was because the Validate step detected the processor speed as 3 mhz which was significantly below the 800 mhz threshold that was set as default. To get past this I would just disable the validation steps. That was until I worked out how to isolate this issue.
First, I ran ZTIGather.wsf with the debug switch:
cscript ZTIGather.wsf /debug:True
This script outputs a massive list of Properties and Values that can then be piped into a text file for review. Within the results is the IsVM property which indicates that the machine is a Virtual Machine if the value is TRUE.
Open the task sequence step and select the Options tab. Add an if Statement like below:
Then add a Task Sequence Variable Condition:
The result is you will have a working conditional statement.
This will prevent the task sequence step from running on a Virtual Machine.