Forcing Weekly Reboots via SCCM

In my environment, it was decided that we would reboot all PCs once a week. The merits of this are intensely debated on the internet, so this may not be the right route for your organization to take, but it definitely does serve some valid purposes in our opinion.

  • Ensures that all PCs are regularly rebooted
  • Ensures that all PCs are in a state that will allow upgrades of third-party software (Java, for example) that will fail if the software or other certain applications are running
  • Eliminates the user-side guesswork of whether this is the week their computer will reboot for patching; through a series of Powershell scripts, we send an email to each of our offices at 1:15pm local time every Tuesday (right around when most people are getting back from lunch) to remind them that their computer will reboot overnight

Like I said, there are many people who see this as unnecessary or detrimental, but others who think it’s a great idea. For the most part, we’re in the latter camp. In order to set this up, I first created a collection with a Maintenance Window from 10pm Tuesday night until 3am Wednesday morning. It is very important that you have a Maintenance Window configured before you set up these forced reboots, otherwise machines that are already powered off before the users left for the night will reboot themselves when powered back on the next day.

To set up the forced reboot advertisement:

  1. Create a new package called “ForcedReboot”
  2. Right-click Programs and select New Program.
  3. I named mine simply “ForcedReboot”. Set Start In to c:\windows\system32, and set After Running to Program restarts computer.
  4. My command line is shutdown.exe -r -t 300 -c “Initiating scheduled reboot for system maintenance. You have 5 minutes to save your work before mandatory forced reboot.” This gives a reboot with 5 minutes of lead-time, and displays the message in quotes to any users who may still be logged in.
  5. Create an advertisement with a mandatory advertisement a little bit into your Maintenance Window (you want to give yourself some time to run things before the reboots if necessary). I advertise this to the same collection I use for Microsoft Updates. Set it to recur every 1 week the night of your Maintenance Window. You’ll also need to change the Program Run Behavior of the advertisement to Always Rerun Program.

It’s important to note that your clients will not reboot at exactly the time you set the advertisement for. For example, if you have it set to run at 10:30pm, but have a Countdown Notification Length of 5 minutes, your machines won’t reboot until 10:40pm (advertisement time + Countdown Notification Length + lead time built into the command line). Also important to note: users with administrative privileges can execute a shutdown /a to abort the shutdown, but only after the Countdown Notification has ended.

10 thoughts on “Forcing Weekly Reboots via SCCM

  1. Tod

    You can run it under the system /other/ account to prevent the user from doing a shutdown /a. But then they could just launch a cmd as system and do it there.

  2. Talon

    What do you do about clients that were powered off at the required time (10:30pm) and then when they boot up the next morning they are greeted with your message and a 5 minute timer?

  3. Raju

    Hi there, we have a similar weekly reboot set up in our 2012 environment. The issue we are facing now is that few machines are executing this reboot script advertisement multiple times and causing repeated reboots. We are unable to figure out what is causing the advertisement to run like this.
    Please help me with your ideas and suggestions to fix this issue.Thanks

  4. Jeremy

    I have found that I prefer to run a package or application that is just a VBS script (though you could use others) that runs and only does a return code of 3010 (reboot needed).

    Then it uses SCCM’s built in reboot warnings and timers that you have built.

  5. Pingback: Rolling back from a bad KB Update - Adam Fowler - I.T. From Australia

  6. Bill

    Great process. Would you be able to provide a screen shot I have set this up but I seem to be having an issue with systems that were not on during the reboot and are rebooting the next morning.

  7. Pullela Nagaraju


    If none of the users logged into the reboot time. Still Countdown Notification Length of 5 minutes comes into the picture ?

    Only Countdown Notification Length of 5 minutes this will come into picture when users are logged into the machine correct ?

Leave a Reply

Your email address will not be published. Required fields are marked *

Please do some math to prove you\'re a human: * Time limit is exhausted. Please reload the CAPTCHA.