In some cases, it may be useful to create temporary collections based on a deployment. This allows for machine-specific processing or advanced analysis. SCCM does not natively allow to create such collections. Fortunately, we can rely on the Deployment Assignment ID and status code to do this.
Retrieving the Allocation ID
To begin, we need to retrieve the deployment’s attribution ID. To do this, go to “Monitoring” and then “Deployments“. Right click on the column and add the column “Attribution ID“. Find the desired deployment and copy its ID. In our example, the ID will be “16779418“.
Creating the collection
In “Assets and Compliance“, create a new collection. For example, if you want to make a collection of all items in error, type the following query:
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_AppDeploymentAssetDetails on SMS_AppDeploymentAssetDetails.MachineID = SMS_R_System.ResourceId where SMS_AppDeploymentAssetDetails.AssignmentID = "16779418" and SMS_AppDeploymentAssetDetails.StatusType = "5"
If you wish to group machines with the status “in progress”, you will need to change the “5” to “2”. You will find the list of values at the bottom of this page.
Special case: Unknown computers
Sometimes, the query to group computers displayed as unknown may not work. In this case, use the following query:
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_CIDeploymentUnknownAssetDetails on SMS_R_SYSTEM.ResourceID = SMS_CIDeploymentUnknownAssetDetails.MachineID and SMS_CIDeploymentUnknownAssetDetails.AssignmentID = 16779418
Memo : WMI SMS_AppDeploymentAssetDetails class
VALEUR | APPLICATION STATUS |
---|---|
1 | Success |
2 | InProgress |
3 | RequirementsNotMet |
4 | Unknown |
5 | Error |