kungfumang Posted March 12, 2015 Report post Posted March 12, 2015 Hey Everyone, I'm new to the whole SCCM world and I'm trying to figure out how to find all the computers on the network that do not have a specific application installed. I've tried to copy and paste examples from search and modifying it to fit my needs but it's not returning any information. Ultimately the goal is to push out the applcation to the computers that do not have the application installed. So I've setup 2 queries in an attempt to find information. Through searching it seems like the norm to find all systems WITH the app first and then create a 2nd subselection. I did limited the query to a collection that list all of the site computers. 1. find all computers with the application select SMS_R_System.Name 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 = "Microsoft Lync 2010" 2. Query to find systems not in 1st query. select SMS_R_System.ResourceId, SMS_R_System.Name from SMS_R_System where SMS_R_System.ResourceId not in (select SMS_R_System.Name 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 = "Microsoft Lync 2010") Anyone see what is wrong? Thanks in advance! Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted March 13, 2015 Report post Posted March 13, 2015 I see what wrong you are not comparing apples to apples.. in you subselct query, what are you returning? In your Where section of your second query what are you returning? Will they ever match???? Hint: Nope.. Make them the same it will work. Quote Share this post Link to post Share on other sites More sharing options...
kungfumang Posted March 13, 2015 Report post Posted March 13, 2015 Thanks for the reply GarthMJ! I'm not sure what that means. I used the GUI version to setup it up and then pasted the query above. I will delete my queries and try again to hopefully get it match. Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted March 15, 2015 Report post Posted March 15, 2015 ResourceID will NEVER match Name. Change the Name to ResourceID any everything will be fine. where SMS_R_System.ResourceId not in (select SMS_R_System.Name Quote Share this post Link to post Share on other sites More sharing options...