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.


Here is the actual WQL you can use:




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


SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Adobe Reader%"

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



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.


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"


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


Comments (8)

  1. Mike Niccum says:

    I had to use "Installed Software – Product Name" and it worked.

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID
    = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ProductName like "%NetScaler Gateway%" and SMS_G_System_INSTALLED_SOFTWARE.ProductVersion = ""

  2. Marat says:

    How i can create Collection of computers missing an updates?

  3. Henrik says:

    Balls! I’ve been writing subselect queries in SCCM for years and I came across this blog post today. Tested it out and got the results I was looking for! Today is a good day! Thanks for posting this.

  4. luis says:

    Thanks with this now i can get all machines with my old Symantec Enpoint Protection and remove it with a script.

  5. TJ says:

    Not sure what’s up with my query. I have it telling me I have a list of servers that don’t have the application in the add and remove programs but when I login to one of them, I see the application there.

  6. Ville says:


    Are you using ADD_REMOVE_PROGRAMS or ADD_REMOVE_PROGRAMS_64 in your query?

  7. @ Ville, Yes is the app was x64. If you enabled the Installed Software class for AI you could use that since it includes both locations.

  8. Rishi Pandit says:

    Thanks for the post Justin.

Skip to main content