28 September 2012

Scheduled reboot for Windows Server

If you need to restart a Windows Server, you have a lot of options:

  1. Use PowerShell cmdlet Restart-Computer.
  2. Use Sysinternals tool psshutdown.exe (downloadable from http://live.sysinternals.com/psshutdown.exe, sometimes it’s available also with UNC \\live.sysinternals.com\tools\psshutdown.exe, you need to start webclient service using net start webclient in administrative command prompt)
  3. Use the shutdown.exe already in Windows installation.
  4. Or just use graphical interface :)

For instant reboot you can use all of them (for example PowerShell’s Restart-Computer with no parameters reboots local computer instantly).

To schedule a reboot, I suggest psshutdown.exe (shutdown.exe is a strip down version of psshutdown.exe, with less parameters). To shut down the server @22:22 (22 minutes past 10pm) use this command:

psshutdown -f -r -t 22:22

image

The 13:38:00 in the picture doesn’t mean the reboot time, which is 22:22:00. It mean’s that after 13 hours and 38 minutes the server will reboot.

If you need to abort the countdown, use psshutdown –a

image

No comments:

Post a Comment