Loading Now

Create an SCCM Collection based on software installed

Create SCCM collection based on software installed

It is useful to create SCCM collections for workstations or servers having a certain piece of software installed. This can help visualize just how many systems have the software install. Another thing I have used this for in the past is to help you deploy updates or vulnerability fixes to systems with that software. To create an SCCM group follow this post. Here is the query you need to put into SCCM to create an SCCM collection based on software installed.

This example is for creating a collection of systems with Flash installed. You can replace the word Flash with the name of the application you want to search for. The % signs are wildcards, I recommend keeping them but your case may vary. In your device collection’s membership rules select Query Rule. Then name your query and click Edit Query Statement.

Screenshot_20200925_083628 Create an SCCM Collection based on software installed

In the next window select Show Query Language

Screenshot_20200925_083741 Create an SCCM Collection based on software installed

Now Paste the below into the window that shows up (make sure to delete whatever was in there by default). Now click OK and save your collection. Don’t forget to right click your collection and click update membership!

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_ADD_REMOVE_PROGRAMS  on  SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId  where  SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Flash%"  and  SMS_G_System_ADD_REMOVE_PROGRAMS.Version like "%" order by SMS_R_System.Name
Screenshot_20200925_074824 Create an SCCM Collection based on software installed

My name is Skylar Pearce, I have been working as a System Administror since 2013 as well some side consulting work. During my career I have worked with everything from Active Directory and vCenter to configuring routers and switches and phone systems, documenting and scripting my way through the whole thing. I have a Security+ certification and am currently working on my PenTest+. Throughout my career I have gained almost all of my knowledge from blogs like this. It is now time for me to pay it back. Over time I have gathered scripts and tricks over the years that I will share on this site. A lot of the posts here will be mainly reference posts, some will be full on how to’s. I am happy to go into more depth on any other topics I go over here, just make a comment on a post. I will do my best to post once a day on weekdays but as I run out of ideas it may slow down. My WordPress skills are still growing so the site will likely get better over time as I learn. You can reach me at contact@allthesystems.com or on LinkedIn