Quantcast
Channel: Configuration Manager 2012 - Application Management forum
Viewing all articles
Browse latest Browse all 4762

Collection Query to Find PCs without Mozilla Firefox

$
0
0

Hi all,

Looking for a bit of a hand with my first-time SCCM query.  The final query would be a bit different to the below, but for troubleshooting and simplicity I'm using the following until I get a sensible result.

Recently deployed Firefox to all vista and 7 clients in our company and want to find all clients where firefox is NOT installed.  Since my query was giving unexpected results I'm using a simpler query, which returns only my own PC for the moment; I have Firefox installed.

At first I created a query which would simply find my PC based on hostname and add it to the collection; this worked.  I then modified the query to say "AND ADD_REMOVE_PROGRAMS.DisplayName like "%Firefox%".  Here's the query:

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_SYSTEM on SMS_G_System_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM.Name = "MyPCHostname" and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Firefox%"

Hey presto; my PC remains a member of the collection, as you would expect.

Next up I modify the query to state:

and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "%Firefox%"

I refresh the collection membership and... my PC remains a member!  In the words of Chris Morris, "This is exactly what we did not want to happen".

I repeated the above with Google Chrome and same undexpected results happened, so I'm sure my query is at fault; could anyone guide me in the right direction?  A few key points:

  • I'm certain the Add/Remove Programs display names are correct
  • This is my first time messing around with these queries
  • I followed advice steps from TechNet to build the query, but not sure if I'm using the "and" operator correctly, or if nesting of statements is required

Any help is appreciated, thank you.


Viewing all articles
Browse latest Browse all 4762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>