Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need help creating/implementing a GPO to reboot computers nightly

Posted on 2009-04-02
5
Medium Priority
?
738 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 47

Expert Comment

by:Donald Stewart
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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

610 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