[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Automatically reboot group of computers

Posted on 2006-05-08
Medium Priority
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

Accepted Solution

dooleydog earned 672 total points
ID: 16632029
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

gsgi earned 664 total points
ID: 16632269
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

star_trek earned 664 total points
ID: 16632280
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 16632359
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

ID: 16632387
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

ID: 16632418
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.

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

873 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