Schedule Windows server to reboot or shutdown automatically

Sometime it is necessary to reboot (or shutdown) windows server. Under UNIX or Linux you can use reboot / hal t/shutdown command via cron jobs or at command. But, when it comes to Windows server there is no built in command exist. Only Windows 2000 Resource Kit offers shutdown command line utility.

However, sysinternals has nifty utility called PsShutdown. It is a command-line utility similar to the shutdown utility from the Windows 2000 Resource Kit, but with the ability to do much more. In addition to supporting the same options for shutting down or rebooting the local or a remote computer, PsShutdown can logoff the console user or lock the console (locking requires Windows 2000 or higher). PsShutdown requires no manual installation of client software.

How do I schedule Windows Server Reboot / Shutdown?

You can download PsShutdown from sysinternals web site.

Store file on Windows server in folder. I use folder called C:\admutils. Next open windows command prompt (Start > Run > cmd) and use windows at command to schedule reboot:
c:> at 2:00am c:\admutils\psshutdown.exe -r -f -c -t 10
Above command will reboot system at 2am. If you want to shutdown system:
c:> at 1:00am c:\admutils\psshutdown.exe -s -f -c -t 10

  • -s: Shutdown windows server
  • -r: Reboot windows server
  • -f: Forces all running application to exit
  • -c: Allow the shutdown to by cancel by user
  • -t: Specifies the countdown in seconds until the shutdown

For more information read official psshutdown documentation. Read at command help by typing at /? command.

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
57 comments… add one
  • Manju Jan 24, 2014 @ 5:35


    thank you all for giving useful info but the thing is i am using windows server 2008 32-bit. I don’t want to restart or shutdown server but it is automatically restarting daily at same time no logs, error records. Still i am unable to find that reason for daily same time restarting. How to find or edit exact task if it is any task is scheduled?
    please guide me to solve this issue

    Thank You

  • Girish Sep 5, 2013 @ 13:08

    better to create a .bat for scheduled restart and put it into startup which will keep on releasing command for every startup for next restart.

  • Julius A. Woodson Dec 12, 2012 @ 16:14

    Thanks Vevek, I try the auto shutdown script and it work well. thanks for the info once aagain it was cool.

  • Abhilash Sep 27, 2012 @ 9:30

    HI Evreybody,
    I have four windows server 2003 , I want to reboot this servers one by one automatically with a timedelay after power came. Any one Please give the solution for this…!

  • Terry Aug 30, 2012 @ 19:09

    Sysinternals tools are now available here from Microsoft:

  • Mohammad May 1, 2012 @ 6:31

    the best way is to scheduled tasks option in control panel!

  • Akeem Mar 12, 2012 @ 18:49


    Page Not Found

    We’re sorry, but the page you requested could not be found. Please check your typing and try again,
    or use the search options on this page.

  • antodominic@techiesniffer Aug 20, 2011 @ 12:34

    Why certain taks needs the server to rebooted…can u share y….

  • kadesh Aug 12, 2011 @ 13:15

    How to Set a Timer for Automatic Shutdown
    Setting up a timer for automatic shutdown is no big deal, in fact many people would already know about it, but if you don’t, read on.

    There is no software to install and no tweaks to be made. An automatic shutdown is inbuilt into Windows and ready to be explored. Let’s check out how we can set a timer for automatic shutdown.

    Right click on the desktop. Select New → Shortcut.
    A New Shortcut dialog box will appear.
    In the location box, this is how you will enter the details: shutdown.exe is for calling the shutdown executable. –s is the command for shutdown. –f is for performing a forced shutdown. If an application stops responding when shutting down, this command will force shut it. Using this command is not compulsory, but recommended. And next, the –t command is for specifying the time the shutdown will take place. After you put the –t command give a space and then enter the time in seconds. So in the above example, the computer will be shut down in 6 hours. Let’s put the whole

    command in one line:shutdown.exe -s -f -t seconds

    Click next and the shortcut will be created on the desktop. Give it a name and click it whenever you wish to initiate an automatic shutdown. If you want to change the time, right click on the shortcut, select properties and change the time from the dialog that opens.
    Tip: This command can also be initiated from the Run box or CMD.

    Tip 2: If you want to display a message that displays when the countdown is in progress, you can append a –c command with a message attached. Like this:
    -c “Computer is shutting down”

  • kadesh Aug 12, 2011 @ 13:10


    Thank you all for giving lot of info

  • Norm Mar 15, 2011 @ 9:51

    Matti you pompous ASS!

Leave a Reply

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

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.