Showing posts with label WQL. Show all posts
Showing posts with label WQL. Show all posts

Tuesday 20 September 2022

Device Collection to find two Installed Applications

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.Name in (Select SMS_R_System.Name from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ARPDisplayName = "Symantec Endpoint Protection")
and SMS_R_System.Name in (Select SMS_R_System.Name from SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ARPDisplayName = "CrowdStrike Windows Sensor")

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...