?
Solved

Need help creating/implementing a GPO to reboot computers nightly

Posted on 2009-04-02
5
Medium Priority
?
736 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

777 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