9 Replies Latest reply on Jun 28, 2013 2:31 PM by wade.fields

    Method to Reboot Computers


      Has anyone developed a consistent method for determining computers that have not rebooted in a specific period of time (say 30 days) and prompting the end user that they need to reboot their computer, yet still giving them the option to either cancel or defer the reboot for a period of time?



      I've been able to create a Custom Vulnerability to determine that a computer hasn't been rebooted in 30 days, based on the last boot up time. And even though the vulnerablity scan shows the computer is vulnerable, the reboot never occurs (even though required in the Custom Definition - Detection Rules)


      I also followed the documentation below, and set the final package to reboot the computer, after a Policy Repair task for the above Custom Vulnerablity.




      So far, I have been unsuccessful. Either I'm missing something simple in the custom definition, or I'm going at it from the wrond direction.


      Any ideas?

        • 1. Re: Method to Reboot Computers
          zman Master

          So what is your delivery method set to (e.g., Always Reboot, etc...) The example referenced has it set to only if needed. If there are no pending reboots then it would not reboot.

          1 of 1 people found this helpful
          • 2. Re: Method to Reboot Computers

            If I set the deliver method to "Always Reboot" the user doesn't get prompted to defer or cancel  the reboot. I need the delivery method to be only reboot if needed, but I can't figure out how to make the task "need" a reboot.

            • 3. Re: Method to Reboot Computers
              marcel Specialist

              You can use Security and Patch Settings. Simple create a another policy and set it to always reboot and prompt user. Then you can push this task to your devices or create a query based policy.

              • 4. Re: Method to Reboot Computers
                masterpetz ITSMMVPGroup



                as far as I know a reboot is declared as "Needed" when the registry key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations" exists in the registry of the client. This is normally the case if you install patches or software.




                • 5. Re: Method to Reboot Computers

                  I have a created "workable" solution, by sending a Restart Task (AutoIt EXE file) with a Delivery Method that requires a reboot, but allowed the user to defer the job before running or canceling the job.


                  I was hoping to find a way to have the reboot deferred after a patch and compliance scan. But I could not figure out a way to make the custom definition require the reboot.(first attempt to create custom definitions, so there's probably alot that I missed) I will look into the options of creating the registry key in the Custom Definition.


                  Thanks for the help. 

                  • 6. Re: Method to Reboot Computers
                    mrspike SSMMVPGroup

                    I have found that the "reboot always" does not work if there is not a reboot flag set in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations



                    The vulscan logs will show no reboot is needed, thus is does not reboot

                    • 7. Re: Method to Reboot Computers
                      marcel Specialist

                      In 95 you can create a pre and post script at Scan and repair settings. This should work.

                      • 8. Re: Method to Reboot Computers
                        dgaines Apprentice

                        Any chance you could post your code?  I have an instance where this would be handy.

                        • 9. Re: Method to Reboot Computers

                          My AutoIt script was simply


                               Shutdown ( 2 )


                          I created the query below to target machines which needed a reboot:


                               "Computer"."Type" = "Workstation" AND "Computer"."OS"."NT Info"."Last Boot Up Time" < "GetDate()-30"


                          Created Delivery Method for a Policy-Supported Push "ThirtyDay Reboot"


                          Specifically to allow users to defer running the software dist package, or cancel it all together.


                          Also added a custom message that would clearly indicate the computer was going to restart if the selected deploy now.

                          Screen Shot 2013-06-28 at 4.33.37 PM.png


                          Then scheduled the Restart (AutoIt exe) with a target from the query and a delivery method to allow users to cancel the exe from running.


                          Not the prettiest, but it worked given the circumstances.