Solved

Need help creating/implementing a GPO to reboot computers nightly

Posted on 2009-04-02
5
719 Views
Last Modified: 2012-05-06
We have gone to a new antivirus product and some of our domain computers are drastically slower first thing in the morning.  The scans run automatically every night.  Rebooting seems to cure the issue.  Can someone help with instructions on how to create and implement, or add to the existing GPO, an object to reboot the computers automatically every night after virus scans finish?  If there is an easier way than a GPO, I am open to suggestions.
0
Comment
Question by:rstorm1
5 Comments
 
LVL 47

Expert Comment

by:dstewartjr
ID: 24051138
Use psshutdown
 
https://technet.microsoft.com/en-us/sysinternals/bb897541.aspx
Create a list of the servers you need to reboot in a .txt one per line
create a scheduled task with this in the "Run"  psshutdown @\\server\share\servers.txt -accepteula -r -f -c -t 120
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 24051153
You can do this using a combination of the schtasks and shutdown commands.

If all of your computers are up and running on the network then you could make a list of their names in a text file and then run a command like this to create a scheduled task on all of them at once:
for /F %G in (computerlist.txt) do schtasks /Create /S %G /RU "NT AUTHORITY\SYSTEM" /SC DAILY /ST 02:00:00 /TN NightlyReboot /TR "shutdown -r -f -t 600"

Otherwise you could create a batch script in the group policy node Computer Configuration\Windows Settings\Scripts\Startup which runs this command:
schtasks /Create /RU "NT AUTHORITY\SYSTEM" /SC DAILY /ST 02:00:00 /TN NightlyReboot /TR "shutdown -r -f -t 600"

This will create the scheduled task on each affected machine at every startup.  Running the script when the task is already there will not cause a problem.
0
 
LVL 4

Author Comment

by:rstorm1
ID: 24051249
Thanks, will test as soon as possible.
0
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 24053892
can you tell what is the antivirus ? does the name start with a "f-" ? :)
0
 
LVL 4

Author Closing Comment

by:rstorm1
ID: 31565839
Went with the batch script in GPO.  Seems like that is going to be the ticket.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Know what services you can and cannot, should and should not combine on your server.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

757 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

19 Experts available now in Live!

Get 1:1 Help Now