Partilhar via


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

Comments

  • Anonymous
    February 03, 2015
    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 = "10.5.52.11"
    • Anonymous
      March 21, 2017
      Thanks Mike Niccum,Your query worked for me.
  • Anonymous
    September 28, 2015
    Hello!
    How i can create Collection of computers missing an updates?
    Thanks!
  • Anonymous
    January 15, 2016
    The comment has been removed
  • Anonymous
    February 03, 2016
    Thanks with this now i can get all machines with my old Symantec Enpoint Protection and remove it with a script.
  • Anonymous
    February 09, 2016
    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.
  • Anonymous
    February 19, 2016
    TJ,

    Are you using ADD_REMOVE_PROGRAMS or ADD_REMOVE_PROGRAMS_64 in your query?
  • Anonymous
    February 19, 2016
    @ 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.
  • Anonymous
    March 28, 2016
    Thanks for the post Justin.
  • Anonymous
    June 07, 2016
    Which rule do I select to get Criterion? I got thrown into SCCM with no training so google has been my resource. I don't know a whole lot about SCCM. Using 2012 R2
  • Anonymous
    January 24, 2018
    This solution is not working for me on Current Branch. I can create a collection that contains the software ok, but the collection the 'Exclude' rules is empty and does not populate.