One of the very need features in the new Application model is Global conditions. A Global condition is a requirement rule that is evaluated in real time by the client. The client will only start downloading the application if the global condition is true.

ConfigMgr. 2012 ships with several global conditions like memory, operating system, primary user etc. Those conditions are pretty useful and can be used right out of the box.

clip_image002

Besides the canned conditions, creating custom conditions can be very powerful and all you need is a few steps to get your started. In this post, I’ll explain how you can create a global condition based on WMI that can be used when deploying applications to specific hardware models. For the sake of testing I have created an Application that must only be installed on all Lenovo W510 laptops.

Creating a WMI condition

My global condition will query WMI prior to downloading the application and verify that the computer model matches a Lenovo W510. In order to figure out which WMI class to use, I have downloaded Scriptomatic from Microsoft.

clip_image004

When selecting the Win32_computerSystem class I can see that the property I’m looking for is “Model”.

clip_image005

  1. Next is creating the condition, open the ConfigMgr. administrator console, select Software Library, Application Management, Global Conditions and click Create Global Condition from the ribbon.
  2. Create a condition with these settings:
    Name: Computer model
    Device type: Windows
    Condition type: Setting
    Setting Type: WQL query
    Name space: root\cimv2
    Class: win32_computersystem
    Property: Model

    clip_image007

Configuring the application to use the global condition

  1. Select the Application – in my example 7-ZIP and open the deployment type properties.
  2. Click Requirements
  3. Click Add and configure these settings
    Category: Custom
    Condition: Computer model
    Rule type: Value
    Operator: Equals
    Value: 431929G (that’s the computer model name found with Scriptomatic)

    clip_image009

  4. Click OK and save the changes.

Testing the global condition

Prior to installing the application, I will create a simulated deployment and use that to verify if my global condition is working.

  1. Right click the Application and select Simulate Deployment.

    clip_image011

  2. Select a target collection, the Install action and finish the deployment.
  3. A simulated deployment is almost a real deployment except that the user will never notice anything and that the application is never installed. All the dependencies and requirements rule are checked. ´
  4. Open the Monitoring workspace, select Deployments and have a look at the results from the simulated deployment.

    clip_image013

  5. Click View Status to get more information about the simulation.
  6. I have 1 successfull test deployment and the rest do not meet my requiement rule.

    clip_image015

  7. Click Requirements Not Met. Notice that is show the Actual Value of the WMI property, very nice.

    clip_image017