TJESIOLOWSKI
asked on
reboot PCs via Group Policy
Hello -
I've got about 100 PCs and would like to reboot them on a schedule of once a week. What is the best way to do this through Group Policy? Can I write a batch file with the shutdown -r command and somehow tie it to scheduled tasks? Do I need to script out the scheduled task part along with the shutdown command?
Any help would be greatly appreciated..
Thanks!
I've got about 100 PCs and would like to reboot them on a schedule of once a week. What is the best way to do this through Group Policy? Can I write a batch file with the shutdown -r command and somehow tie it to scheduled tasks? Do I need to script out the scheduled task part along with the shutdown command?
Any help would be greatly appreciated..
Thanks!
I think SysInternals has a utility you can use to shutdown computers, http://www.sysinternals.com/, that will take a list of computers in an input file and reboot'em all. Then you can schedule just one task on a server.
Here is a link explaining it.
https://www.experts-exchange.com/questions/22695602/Schedule-a-PC-reboot-through-GPOs-at-a-given-time-of-day.html
https://www.experts-exchange.com/questions/22695602/Schedule-a-PC-reboot-through-GPOs-at-a-given-time-of-day.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry, forgot to mention that you'll need to erase the entries in the csv file for computers you don't want to reboot.
The utility mentioned by tgerbert is psshutdown and it will come with the download for psexec. The command for that is psshutdown @file computers.csv -u domain\user -r (doing this will prompt you for a password. The user you use has to have the right to shut down the system.)
Along with the SysInternals way, you can also make a batch script that holds a list of shutdown commands using the built-in shutdown command:
shutdown /m \\Computer1 /r
shutdown /m \\Computer2 /r
shutdown /m \\Computer3 /r
shutdown /m \\Computer1 /r
shutdown /m \\Computer2 /r
shutdown /m \\Computer3 /r