The customer wants to create a filter that displays what computers require a reboot/restart
The customer is aware of the "Restart Status" Report (under Reports > All Reports > Software > Patch Management > Remediation Status > Restart Status) but what he would like to do is create a filter that shows him the computers that require a reboot/restart just like the report does. He would like to do this so he can easily add that filter to a Target and apply it to a policy to reboot the computers, etc.
ITMS 8.6, 8.7
Patch doesn't have a filter based on "Restart Status". Moreover, the count of Patch filters, which are used in our scenarios, is very limited:
Now, if it is needed, you can create a custom filter based on the following query:
SELECT DISTINCT cmp.Guid
FROM vComputerResourceEx cmp
LEFT JOIN vPMCore_GetAllRetiredMachines ret ON ret.Guid = cmp.Guid
JOIN Inv_Software_Update_Distribution_Status sus ON sus._ResourceGuid = cmp.Guid
WHERE ret.Guid IS NULL -- exclude the retired machine
AND sus.DistributionStatus = 65536 -- STATE_REBOOT_PENDING
AND cmp.IsLocal = 1