Collection of computers missing an application / software title in Configuration Manager

A question that I see a lot is how can you create a device collection of machines that don't have a particular piece of software installed?

This task is much easier in Configuration Manager 2012 since we can make use of the include and exclude collection rules. In Configuration Manager 2007, you would need to create a sub-select query to accomplish this which takes more time.

In this post, I'm going to demonstrate how you can use include and exclude collection rules to create a collection of machines that do and do not have a certain application installed.

Step 1: You will need to create a collection of machines that actually have the software installed. In this example, I will use Adobe Reader as my application. Here's what the query will look like in the Criterion Properties. Notice my query is finding where the Display Name contains %Adobe Reader% so it will find computers with any version of Adobe Reader installed. You could customize your query to be more specific if needed.

1

Here is the actual WQL you can use:

select

*

from

SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceId = SMS_R_System.ResourceId

where

SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Adobe Reader%"

I have one computer in my lab that has Adobe Reader installed.

2

3

Step 2: We will create a machine collection of computers that do not have Adobe Reader Installed. We will use an include and exclude rule to accomplish this.

Add an Include Rule in the new collection wizard. You can include any collection of machines you want except the collection you created in step 1. In my case, the collection i created in step 1 was named "Adobe Reader Installed". I created an include rule for "All Desktops and Servers" collection this will allow me to find all computers in my environment that don't have Adobe Reader installed.

4

Next we will create an exclude rule. You will exclude the collection of machines you created in Step 1. In my case, this collection was the "Adobe Reader Installed Collection"

5

Exclude rules will take priority over an Include rules. For example, lets say the collection you selected for your include rule contains a computer named "PC1" and the collection you selected for your exclude rule also contains "PC1. In this case, PC1 will be excluded from your collection since PC1 was in the collection in your exclude rule.

I had 4 computers in my environment without Adobe Reader installed

6