SCCM Dynamic Collection using Application Deployment Status

The SMS_AppDeploymentAssetDetails Windows Management Instrumentation (WMI) class is an SMS Provider server class, in Configuration Manager, that represents asset-level details about the deployment.

The below properties of SMS_AppDeploymentAssetDetails class can be used to create dynamic query based collection using app deployment status.

AppStatusType

Application status type, Possible values are:

ValueApplication status
1Success
2InProgress
3RequirementsNotMet
4Unknown
5Error

StatusType

Status type, Possible values are:

ValueStatus type
1Success
2InProgress
3RequirementsNotMet
4Unknown
5Error

Related Post: If you are looking for step by step process to create a dynamic / query based collection then follow this article : How to Create Dynamic Collection in SCCM

Find Application Assignment ID

To create a collection based on application deployment status, we need the Assignment ID of the application. Perform the below steps to find Assignment ID.

  • Navigate to Monitoring > Deployment , right click on column header and select Assignment ID to add the column.
  • Note down the Assignment ID of the application for which you need to create a dynamic query based collection.

ConfigMgr Deployment | Add a column

App Deployment Status – Success

The below WQL query will inlcude all computers in the collection where respective software deployment was succeeded.

select SYS.ResourceID,SYS.ResourceType,SYS.Name,SYS.SMSUniqueIdentifier,SYS.ResourceDomainORWorkgroup,SYS.Client from sms_r_system AS sys INNER JOIN SMS_AppDeploymentAssetDetails as APP on App.MachineName = sys.name WHERE AssignmentID = '16777971' AND StatusType = 1 AND AppStatusType = 1

App Deployment Stauts – Failed

The below WQL query will include all computers in the collection where respective deployment was failed. This is helpful when you need to troubleshoot application deployment failure. You can quickly identify online machines and view SCCM client logs to understand the issues.

select SYS.ResourceID,SYS.ResourceType,SYS.Name,SYS.SMSUniqueIdentifier,SYS.ResourceDomainORWorkgroup,SYS.Client from sms_r_system AS sys INNER JOIN SMS_AppDeploymentAssetDetails as APP on App.MachineName = sys.name WHERE AssignmentID = '16777971' AND StatusType = 5 AND AppStatusType = 5

App Deployment Stauts – In Progress

The below WQL query will include all computers in the collection where respective deployment status is In Progress. This is helpful when you need to troubleshoot application deployment on the computers where status got stucks at In Progress stage.

select SYS.ResourceID,SYS.ResourceType,SYS.Name,SYS.SMSUniqueIdentifier,SYS.ResourceDomainORWorkgroup,SYS.Client from sms_r_system AS sys INNER JOIN SMS_AppDeploymentAssetDetails as APP on App.MachineName = sys.name WHERE AssignmentID = '16777971' AND StatusType = 2 AND AppStatusType = 2

App Deployment Status – Unknwon

The below WQL query includes all computers in collection which deployment status is still unknow. As per Microsoft documentation, StatusType =4 should return the list of all computers with unknow deployment status. However, that is not the case. I have noticed this earlier as well when working on Software Update Compliance status. Hence, the follow different approach to identify unknown computers. The below WQL query will use subset query to identify the computers with Success, In Progress, Requirement Not Met and Failed and the computers not in this list will be considered as unknown.

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 where SMS_R_System.ResourceId not in ( select SYS.ResourceID from sms_r_system AS sys INNER JOIN SMS_AppDeploymentAssetDetails as APP on App.MachineName = sys.name WHERE AssignmentID = '16777971' AND StatusType IN ('1','2','3','5') AND AppStatusType IN ('1','2','3','5'))

Related Posts

Subscribe to Techuisitive Newsletter

Be the first to know about our new blog posts. Get our newsletters directly in your inbox and stay up to date about Modern Desktop Management technologies & news.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top