1

I have been using scheduled tasks to reboot a small amount of windows 2003 servers, I'd like to start rebooting the rest (400) every three months.

Whats the most efficient way to implement this on 2003 without having to visit the server.

  • 3
    Why are you just randomly rebooting them every three months? Is there a specific need for this? If it's for the sake of a reboot, you should have a maintenance window for patching the servers and reboot then. – HostBits Jan 14 '14 at 14:25
5

Use a script to call shutdown /r /t 0 /m \\server. The /m switch executes the shutdown on a remote machine. As a rough example, if you have a text file with each server name on a separate line, using PowerShell from a control computer, you could run:

get-content c:\servers.txt | foreach-object { shutdown /r /t 0 /m \\$_ }
  • This is a great command thanks, but will only work on 2008 servers, we have mostly windows 2003, looks like ill have a bit of installing to do.! – JJJJNR Feb 17 '14 at 13:50
  • 1
    You can run it from a 2008+ or Vista+ machine and have it shut down 2003 servers. – MDMarra Feb 17 '14 at 14:40
3

You shouldn't reboot servers just for the sake of it. If a server "slows down" over time, you should be tracing the root cause of this, not rebooting it randomly. And if its performance doesn't degrade over time, why are you bothering with useless reboots?

Besides, if a server goes more than three months without a single reboot, this means you're not regularly applying updates to it; and this is a far more worrying issue...

  • This is a good point. I assumed the OP was doing quarterly patches. I hadn't considered that he was doing it just "because" – MDMarra Jan 14 '14 at 14:34
  • @MDMarra I assume anyone who doesn't reboot Windows after Patch Tuesday isn't applying patches. – Michael Hampton Jan 14 '14 at 16:12
  • 1
    @MichaelHampton after the (somewhat) recent Exchange UR that killed most of the DAGs in the world, and the WMF 3.0 update that killed a lot of System Center products as well as Exchange 2007 and 2010 - I think a lot of people wait at least a week or two before applying updates now (unfortunately). Still, I know plenty of organizations that only have quarterly maintenance windows. I disagree with it, but that doesn't make it less of a reality :( – MDMarra Jan 14 '14 at 16:13
  • @MDMarra, at least they have some maintenance schedule... could have been worse, could have been a lot worse. – Massimo Jan 14 '14 at 17:10
  • Yes its for a patching schedule im implementing in a new job, using windows update service. im planning to use gp to manage the reboots of the servers. – JJJJNR Jan 15 '14 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.