Creating a custom filter for computers that requires a reboot/restart
search cancel

Creating a custom filter for computers that requires a reboot/restart

book

Article ID: 262339

calendar_today

Updated On:

Products

IT Management Suite Patch Management Solution

Issue/Introduction

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.

Environment

ITMS 8.6, 8.7

Resolution

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:

 
The official recommendation is to use automatic restart (if required) at the end of the Patch cycle:

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