MDT 2010: Check for Virtual Machine using Task Sequence Conditions

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.

About Andrew Barnes

A Scripting and Deployment Specialist.
This entry was posted in Deployment, MDT 2010 and tagged , . Bookmark the permalink.

4 Responses to MDT 2010: Check for Virtual Machine using Task Sequence Conditions

  1. Tarkan Koemuercue says:

    you can also set the flag “Continue on Error” without using conditions!


    • That’s right, Tarkan. However this would stop the task sequence step from checking other computers in the organisation. I personaly find this usefull and want it to continue checking servers, desktops and laptops.


  2. Anurag Yadav says:

    One question Andrew, how can I show a message if the condition in task sequence is not met? Actually, I want to allow the deployment guy to make sure that he plugs in power cable in the laptop during installation initialization. I can put a script to check if laptop is on battery or not but can’t figure out how to prompt if the condition is not met. MDT 2012 has a IsBattery variable, but I am not thinking of upgrading just yet.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s