I currently have a policy action set to reboot server devices. The relevance is set to:
The action is scheduled to run every Sunday between 06:00-07:00 GMT.
the policy action is set to "Reapply This Action -> While Relevant Waiting -> 5 Days"
the post action is set to “Restart Computer after action completes” with a deadline of "2 minutes"
It is successful when all lines of the action script are successful.
The action script runs a script that alters our monitoring system but does not contain any “action requires restart”
The action works well on most devices. However, I am finding that some devices reboot and return ‘Pending Restart’ if I check the “BESPendingRestart” and “PendingFileRenameOperations” registry keys they have values.
My problem is that this action will never run again.
I have tried putting relevance in above the ‘Pending Restart’ that would be false if the uptime was less than 5 days, but that did not effect the results.
Is there any way that I can reboot the server, and have it waiting for the next reboot window even if the device is pending restart after the initial reboot?