Question Locked

GPO - Restart Computers

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hello
i need a gpo that restart the computers on my network at specfied time.

regards

4 replies

by jiminpa

if there is a GPO that will do that but you could try a scheduled job using the shutdown command.

shutdown -r

there are other switches you can use to customize the reboot as well.

by dumphrey

a batch file from a server will do the trick.

Create 2 files, reboot.bat and hosts.txt

Reboot.bat should contain the following

for /F %%a in (hosts.txt) do shutdown -r -f -m \\%%a

then, in hosts.txt, make a list of machines to reboot (can pull from AD with dsquery), one machine per line. just the machine name, no domaine names needed.

The script can then be scheduled to run from the scheduled tasks on the server. You will have to make changes to the hosts file, or write a more complex batch file that populates that file on its own with queries.

This discussion is closed to new replies.