Showing posts with label SoftwareUpdates. Show all posts
Showing posts with label SoftwareUpdates. Show all posts

Friday 3 December 2021

Configuration Manager: WQL Query to find the machines based on Deployment Status

WQL Query to find the machines falls under unknown tab for any application or software update deployments:

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
Join SMS_SUMDeploymentAssetDetails D
On SMS_R_System.resourceID = D.resourceID
Where D.assignmentID = '<Assignment ID>' and D.StatusType = '<Status No>'

To 'Assignment ID', Open Configuration Manager Console > Monitoring > Overview > Deployment > Select and right click the deployment and tick the Assignment ID

Assignment ID

Once you selected Assignment ID, a column will be added like below then copy the ID for your query:



And for machine status, below are the values for the respective status (Screenshot from Microsoft Document - SMS_SUMDeploymentAssetDetails Server WMI Class):


For example for Unknown machines:

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
Join SMS_SUMDeploymentAssetDetails D
On SMS_R_System.resourceID = D.resourceID
Where D.assignmentID = '16779116' and D.StatusType = '4'







FREE Cybersecurity Certifications

Here's 15 FREE courses provided by the Qualys. The cybersecurity firm Qualys focuses on providing cloud-based security and compliance so...