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:
Value | Application status |
---|---|
1 | Success |
2 | InProgress |
3 | RequirementsNotMet |
4 | Unknown |
5 | Error |
StatusType
Status type, Possible values are:
Value | Status type |
---|---|
1 | Success |
2 | InProgress |
3 | RequirementsNotMet |
4 | Unknown |
5 | Error |
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.
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
- How to Create Dynamic Collection in SCCM
- Enclosure Chassis Types Value & Description | ConfigMgr | SCCM
- ConfigMgr: Maintenance Window for member of specific collection – SQL Query
- SCCM Dynamic Collection for Windows 10 / 11 Devices
- SCCM Device Collection Equivalents in Microsoft Intune for App Deployment
- SCCM Dynamic Collection Based on Device Type | Collection Queries
- SCCM Collection Based on Operating System Optional Features
- SCCM Device Collection Based on Installed Software Products & Inventoried Files
- SCCM Device Collection Based on Computer Hardware Details
- SCCM Collection Queries for Opearting System Attribute Class
- SCCM Collection Queries for System Resource (SMS_R_System) Attribute Class
- SCCM Dynamic Collection using Application Deployment Status
- SCCM Dynamic Collection Based on Configuration Baseline Compliance Status
- How to Create , View and Organize SCCM Maintenance Windows
- How to Provision Windows 10 / 11 Device using Intune and Windows Autopilot
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.