Global conditions in ConfigMgr 2012

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


Comments (7):

  1. Thomas Forsmark Soerensen says:

    Hi,

    If you want the WMI query to work on all W510 models (with different model numbers) you can use the “CSProduct” class instead and use the “Version” property. It will respond with the “Thinkpad W510” name instead of the product number.

    Kind Regards
    Thomas

  2. Some one says:

    Could you post somekind of example on AD query? For example groups or something.. ?

  3. Tomasz_G says:

    Hello,
    maybe this link with WMI queries for Task Sequence will be usefull:
    http://www.faqshop.com/wp/misc/wmi/list-of-wmic-csproduct-get-name-results

  4. […] for your model, I was able to use @agerlund  Kent Agerlund’s blog to achieve this: http://blog.coretech.dk/kea/global-conditions-in-configmgr-2012/These next few parts are borrowed directly from his post (When a Master creates good content, why […]

  5. Hermann says:

    Any log file on client for tracking errors related with custom global condition evaluation?

  6. Saurabh says:

    Thanks for the information.
    1. What I want to know is does client evaluates global condition or condition is compared in console through collected hardware inventory?
    2. Would it affect bandwidth if we are deploying application to all systems and after which all machines are gonna evaluate it?

Leave a Reply