I was wondering how accurate queering SMS_UpdateComplianceStatus is and how often this refreshes in the CM database? Is it based on a Hardware Inventory cycle or on the Software Update Scan cycle? I am running 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_UpdateComplianceStatus ON SMS_UpdateComplianceStatus.machineid=sms_r_system.resourceid WHERE SMS_UpdateComplianceStatus.LastEnforcementMessageID = 9to get a count of computers with pending restarts. Does the last enforcement message reference any pending reboot or just ones from Update installs?