Easy way to Reboot W2K3 server automaticly

Posted by

Sometimes It can come in handy to reboot a server on a scheduled base. This can prevent memory issues (SQL/Exchange/…) and sometimes just to force all services to reboot.

You don’t have to be an expert to do this:

Go to “Scheduled Tasks” and create new scheduled task

Browse to folder WINDOWS/System32 and select “shutdown.exe

select schedule (for example weekly)

and define schedule on next page (ex. saturday 23:30, every 2 weeks)

Confirm the user. BEWARE that this user must have password settings that don’t expire!

now on the last page select “open advanced properties“. If you don’t do this, the system will just shut down.

Add the following to the run script: C:\WINDOWS\System32\shutdown.exe /r /f /t 0 /d p:0:0

explanation of the switches:

/r = reboot

/f = force applications to shutdown

/t 0 = zero second waiting time (you can add time for the user to exit script)

/d p:0:0 = the reason why you shut down (in this case: planned no reason)

Apply again with the same username and password.

For more information about the switches, just run shutdown.exe /? in a command box.

Be Social and Share: Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Leave a Reply

Your email address will not be published. Required fields are marked *