Create Collection Query based on CCM_Application.ID

Steve Pogue 71 Reputation points
2021-02-03T17:58:37.613+00:00

CM running current branch 2006
would like to create a collection based on a query of CCM_Application.ID and need some help creating the query.

To date I have worked with Queries that search Add Remove programs or existence of files with query strings like this"

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

Unfortunately, I work with many Script based installers that do not update the Add remove programs and thus the above query is of no use.

Internally, CM records each application with a CI Unique Id which you will see in client logs such as AppIntentEval, DCMAgent, AppDiscovery and AppEnforce etc.

If you turn on the "CI Unique ID" column in the Console->Software Library->Applications you will see the CCM_Application.ID in column CI Unique. eg.
63602-ciunique.png

Walking through WMI on the client computer with WMI Explorer you can find the relevant applications available or installed on the client:

WMI Explorer
NameSpace: ROOT\ccm\ClientSDK
Class: CCM_Application

SELECT * FROM CCM_Application WHERE Id='ScopeId_A5D88389-7CC4-4728-9618-E26675CEB365/Application_f129454b-d7f8-4182-809c-90ab0e69ca4e' AND IsMachineTarget=true AND Revision='1' AND InstallState = 'Installed'

Is it possible to create a collection query to find computers with the above string

Microsoft Configuration Manager
0 comments No comments
{count} votes

Accepted answer
  1. AllenLiu-MSFT 46,531 Reputation points Microsoft Vendor
    2021-02-04T07:29:18.553+00:00

    @Steve Pogue
    Thank you for posting in Microsoft Q&A forum.
    Like Jason suggested, we may use Configuration Items and Configuration Baselines to get the results and create new collection with the deployments like below:

    63916-4.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Jason Sandys 31,311 Reputation points Microsoft Employee
    2021-02-03T19:02:19.657+00:00

    Is it possible to create a collection query to find computers with the above string

    No, not with the App ID.

    What's the goal here and purpose of the collection? Is it purely for reporting?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.