Automatically reboot group of computers

Posted on 2006-05-08
Last Modified: 2010-04-18
What's the best way to automatically reboot a group of computers each night?

We run Active Directory so I'm thinking about group policy that we can make the machines in question a member of and a script that runs a shutdown command.

How do I schedule the script to run at a certain time and is this the best way to do this?

Question by:joshsfinn
    LVL 9

    Accepted Solution

    I use PSShutdown, from Sysinternals, formerlay Winternals.

    In in i reference a list of computers, and when they should reboot.

    You may be able to use the shutdown command that comes with XP.

    Good Luck,
    LVL 13

    Assisted Solution

    I use the at command to schedule the psshutdown command.  As you can see, you can schedule the at command to run on different computers.
    In the example below, I am telling psshutdown to shut the computer wwr4 down at 7:30pm every night (in case I come in late to do updates and turn them on after 7:30...)  You can also have psshutdown reboot the computer, as dooleydog pointed out.

    C:\>at \\wwr4 19:30 /every:M,T,W,Th,F,Sa,Su c:\psshutdown.exe -f -k
    Added a new job with job ID = 1

    LVL 11

    Assisted Solution

    you can write batch file  like this.

    for /f %%a in (%1) do call :Sub %%a
      goto :EOF

      shutdown -r -m \\%1

    You don't have to apply it as a GPO. Schedule it on a server or on one machine that is not in reboot machine list and it will prompt restart on the remote machines


    Author Comment

    I'd kind of like it to be a GPO so that I can put machines into a group and then it's one less thing to change if we add/remove/rename a computer.
    LVL 11

    Expert Comment

    Even the script I gave does the same thing instead setting GPO you would set the scheduled task on a difft machine like a server. So if you need to rename or add a machine you will do that to the text file and it will reboot all the remote machines in that list

    Author Comment

    I understand but I was thinking that if we add a computer, we would have to add it to other groups anyways so I'd already be making GPO changes which would queue me to add it to the "automatic reboot" group.

    I'm just trying to make this as easy as possible.

    Thanks - these are all good suggestions.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
    On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now