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%"


Popular posts from this blog

Office 365 Deployment - Office 365 Upgrade Task Sequence

SCCM Task Sequence with GUI - How to install more then one image with a single Task Sequence

Windows 10 Setup Script - V