SCCM provides a bundle of pre-default reports at your disposal to cover most needs, there will always be cases where you need a quick search to find something on the fly.

No fancy reporting needed, just raw data. Its here where Custom Query’s shine.

Here is how to make you Custom Query in WQL:

Go to Monitoring -> Overview -> Queries -> Create Query

Create Custom WQL

Create Custom WQL


Create Query Wizard should pop.

Add a name, description and target collection and then click on Edit Query Statement…

Create Custom WQL

WQL Wizzard


WQL Criteria Properties

WQL Criteria Properties


You can then play with a lot of criteria and combination of what you want to achieve.

Do not be shy to experiment.


As a bonus here is a WQL for a list of last HW scan performed.

  1. SELECT SMS_R_System.ResourceID FROM SMS_R_System INNER JOIN SMS_G_System_WORKSTATION_STATUS ON SMS_G_System_WORKSTATION_STATUS.ResourceID =SMS_R_System.Resourceid WHERE datediff(DAY,SMS_G_System_WORKSTATION_STATUS.LastHardwareScan,getdate()) < ‘2’


To change the query to reflect how many days since last HW scan was reported, change the number at the end with your desired one.

Follow on Feedly