• Insights

Creating Global Conditions in Configuration Manager 2012

Kevin Proctor

< 1 min read

All Insights

Recently I was asked by a colleague if System Center Configuration Manager had a way we might test for the presence of a running application prior to attempting to install a piece of software. Giving it a bit of thought I came up with a simple method leveraging ConfigMgr 2012’s new global conditions ability. Global conditions are requirement rules that are evaluated in real time on the client prior to attempting any software downloads/installs.

In my example, I wanted to ensure that Internet Explorer was not running. A simple PowerShell script provided the necessary results, but I needed to ensure I had the correct process name first.

powershell get-process

Next I tested my script [bool] (Get-Process iexplore -ea 0)

powershell script

Time to create our global condition in ConfigMgr. From an admin console, navigate to the Software Library -> Application Management -> Global Conditions and choose Create Global Condition from the ribbon bar.

Create Global Condition

Enter your relevant information in the resulting dialog box

Global Condition IE Check dialog box

Click on the ‘Add Script’ button and enter in your line of code:

Add Script

Click OK twice and now you have your new global condition.

New Global Condition

At this point, you may now reference this condition and use it as a requirement test for any of your deployment types where it is applicable.

In my example, I created a new requirement for a Java 7 Update 15 deployment type. I clicked ‘add’ on the ‘Requirements’ tab and entered the following in the resulting dialog box.

Create requirement

Click OK and you are all set.

Requirements

That is all there is to creating and using a global condition in the new application model in ConfigMgr 2012. Hopefully this quick example gives you an idea of how to leverage global conditions.