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 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 steps below to find the Assignment ID.

  • Navigate to Monitoring > Deployment, right-click on the 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 include all computers in the collection where the respective software deployment 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 Status – Failed

The WQL query below will include all computers in the collection where the respective deployment 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 Status – In Progress

The below WQL query will include all computers in the collection where the respective deployment status is In Progress. This is helpful when you need to troubleshoot application deployment on the computers where the status got stuck at the 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 – Unknown

The below WQL query includes all computers in the collection whose deployment status is still unknown. As per Microsoft documentation, StatusType =4 should return the list of all computers with unknown 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

Explore More SCCM Guides

Continue building your Microsoft Intune & SCCM skills with step-by-step tutorials covering device management, application deployment, automation, and troubleshooting.

  • Microsoft Intune Learning – Explore comprehensive guides on device enrollment, compliance policies, application deployment, Windows updates, and more.
  • SCCM (Configuration Manager) – Explore more SCCM guides covering device management, application deployment, software updates, troubleshooting, and automation.

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.

Scroll to Top