Creating Global Conditions for the Application Model in ConfigMgr 2012
Most of you have probably used the Application Model in ConfigMgr 2012 and above right about now. If you still haven’t made the switch to Applications instead of Packages, I urge to do so. Something that I see at customers and around the internet is the lack of usage with Global Conditions. What is a Global Condition you may ask? In the Application Model when you deploy a software, you have the option to specify certain requirements that will be evaluated to either a certain value or perhaps a boolean value locally on the client. These requirements are constructed by Global Conditions, which in fact is a rule that represents technical conditions. By default Microsoft has provided us with a set of Global Conditions that should suffice in most of the situations when deploying an Application. But sometimes you need to create your own rule to meet the deployment scenario requirements.
In order to illustrate how you can create your own Global Condition and use it as a requirement for an Application deployment, we first need to create it and specify what should be the criteria for the rule. Before we go ahead creating a Global Condition, it’s important to know that it will be evaluated locally on the client. If the requirements for an Application is not met, the deployment will not begin and the content will not be downloaded.
I’d urge you to think twice before you decide to create a Global Condition. Most of the times ConfigMgr already has something that might suite your needs. But when you need to create a Global Condition, there’s a really good documentation page on TechNet which I’ve used several times around. You’ll be able to find it at the following link:
For this blog post, I’ve come up with a scenario where we’re gonna deploy an Application called 7-Zip 9.20 x64. We want to deploy this Application to devices running a 64-bit version of Windows. Instead of creating a collection containing only 64-bit devices, instead we’ll offload that compute to the clients instead. We do that by specify a certain requirement (Global Condition). For this we need to create a Global Condition called Operating System 64-bit.
This scenario could actually be solved by using existing Global Conditions, by selecting one called Operating System and choose all of the 64-bit entries it holds. But I think it’s to many clicks and it’s bound to fail at some point due to human errors.
Create a Global Condition
Let’s go ahead and create a Global Condition. In order to meet the requirements of the scenario we’ve set up, we need to decide on some ground rules. How do we want to determine the compliance state and how do we want to query for the information determining the compliance state? There are several options we could choose from, and what I tend to use most frequently is the WQL query method although it depends on what the scenario is. To determine what version of Windows is running on a device, I already know that there’s a WMI Class called Win32_ComputerSystem. In this class, there should be a single instance that has a property called SystemType. This property holds either two values depending on the Operating System architecture:
- X86-based PC
- X64-based PC
For our Global Condition to work, we need to construct a query that will get us the SystemType where it is equal to X64-based PC. To evaluate the compliance of this condition, we can use a string data type and check if it’s existential.
1. Open the ConfigMgr console and go to the Software Library node.
2. Expand Application Management.
3. Right-click on Global Conditions and select Create Global Condition.
4. In the windows that appears, configure accordingly:
Name: Operating System (64-bit)
Device type: Windows
Condition type: Setting
Setting type: WQL query
Data type: String
WHERE clause: SystemType like ‘X64-based PC’
5. Click OK.
The Global Condition has now been created. Next step is to specify it under the requirements tab on an Application.
Using a Global Condition
In this scenario I’m deploying an Application called 7-Zip 9.20 x64. In order to use our Global Condition with this Application, we need to configure the Deployment Type settings.
1. Go to the Software Library, expand Application Management, choose Applications and select your application.
2. Go to the Deployment Types tab and select Properties on the desired Deployment Type.
3. Select the Requirements tab and click on Add.
4. In the Create Requirement window, configure accordingly:
Condition: Operating System (64-bit)
Rule type: Existential
Radio button: The selected global condition must exist on client devices
5. Click OK and then OK once again on the Deployment Type Properties window.
Before you go ahead and deploy an Application where you’re using a custom Global Condition, it should be considered best practice to perform a simulation of the deployment and verify the results. Do do this, follow the instructions below:
1. Select your application, right click and select Simulate Deployment.
2. Select a collection to use for this simulation.
3. Click on Next and then Next once again until you can click Close on the Completion page.
We can now verify the results of the simulation once the clients have reported back their status messages. Once they’ve done so, hopefully it will look similar to this:
As you’ve seen in this post, you can create Global Conditions for usage with the Application Model based on your special business or technical conditions.
Chief Technical Architect and Enterprise Mobility MVP since 2016. Nickolaj has been in the IT industry for the past 10 years specializing in Enterprise Mobility and Security, Windows devices and deployments including automation. Awarded as PowerShell Hero in 2015 by the community for his script and tools contributions. Creator of ConfigMgr Prerequisites Tool, ConfigMgr OSD FrontEnd, ConfigMgr WebService to name a few. Frequent speaker at conferences and user groups.