Finding computers with a piece of software, say the Edge browser, is fairly easy with ConfigMgr. Simply create a collection that looks for the software in question and query SMS_G_System_INSTALLED_SOFTWARE.
1 2 3 |
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.ClientType, SMS_R_System.NetbiosName, SMS_R_System.OperatingSystemNameandVersion 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 = "Microsoft Edge" |
Finding computers without a piece of software can be more difficult. The trick its to create a query that looks for computers that are NOT in the query that finds the software in question.
1 2 3 |
select SMS_R_System.NetbiosName from SMS_R_System where SMS_R_System.NetbiosName not in (select SMS_R_System.NetbiosName 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 = "Microsoft Edge") |
In the query above, we are saying give me all of the computers that are not in the results returned. So if the results returned contain a list of computers that have Edge installed, a computer not in that list would be a computer without Edge.
In order to create this query, you need to set the “Criterion Type” to SubSelected values. Then you can select the operator, which in this case is “is not in”, then either browse for or paste the subselect query.
It’s worth noting that people smarter than me recommend using ResourceId instead of NetBiosName.