Query - Computers with specific application and version installed

Sometimes you want to create a query based on if a computer has a specific Application and version number. This type of collection is great for bushing out an update to application.

In the example code I am using Adobe Acrobat version 9. To find a different application in your own query find the line in the code

SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "Adobe Acrobat%"

and change "Adobe Acrobat%" to the application you want. Remember you can use % in the beginning or the end of a statement to work like a variable.  Next is the version number, in the example code the line

SMS_G_System_ADD_REMOVE_PROGRAMS.Version >= "9%"

The "9%" is the version, you can change this to anything that shows in the version column of add and remove programs.

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 "Adobe Acrobat%" and
SMS_G_System_ADD_REMOVE_PROGRAMS.Version >= "9%"


Post a Comment

Popular posts from this blog

SCCM Task Sequence GUI - How to set up the TS to work with a GUI

SCCM Applications vs. SCCM Packages: Understanding the Key Differences

How to Deploy a Windows 10 Servicing update as a Application