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.
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.
When selecting the Win32_computerSystem class I can see that the property I’m looking for is “Model”.
- 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.
- 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
Configuring the application to use the global condition
- Select the Application – in my example 7-ZIP and open the deployment type properties.
- Click Requirements
- 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) - 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.
- Right click the Application and select Simulate Deployment.
- Select a target collection, the Install action and finish the deployment.
- 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. ´
- Open the Monitoring workspace, select Deployments and have a look at the results from the simulated deployment.
- Click View Status to get more information about the simulation.
- I have 1 successfull test deployment and the rest do not meet my requiement rule.
- Click Requirements Not Met. Notice that is show the Actual Value of the WMI property, very nice.
[…] […]
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
Could you post somekind of example on AD query? For example groups or something.. ?
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
[…] 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 […]
Any log file on client for tracking errors related with custom global condition evaluation?
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?