Pending Reboot Collection
This blog is to create a device collection to know which machines in your enterprise need rebooting after software updates.
Add a new query rule and specify the name for the query. Next, on the Query Rule window, click Edit Query Statement and past the below query in the Query Language box. This query will find all the computers with pending restarts:
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 joinsms_combineddeviceresources on sms_combineddeviceresources.resourceid =sms_r_system.resourceid wheresms_combineddeviceresources.clientstate != 0
Copy the query statement provided in this document and open Edit Query Statement
Paste the query statement provided in this document and select OK
After selecting the OK button for both the Query Statement Properties and Query Rules Properties boxes. Select Next