• Horn Player – Computer Dude – Gig Pig …
  • Home
  • About
  • Blog
  • Services
  • Contact
  • Webmail
  • Terms

Robert A. Owen - Musician - Technology Leader

Music, Technology, Rants and Funnies - Randomness at its best!

  • Blog
  • Internet
    • IIS 6
    • IIS 7.5
    • Javascript
    • Web Design
      • WordPress
      • Coldfusion
  • Support
    • MicroSoft
      • Powershell
      • Surface
      • Windows10
      • Zune
    • PC-Care
    • Software
    • Virus
      • Email Scam
    • Vista Quest
    • Windows 7
  • Pictures
    • Instagram
  • Music
  • Friday Funnies
  • General
    • CoWorking
    • Gadgets
    • Politico
    • Random – TidBit
    • Rant
    • Review
    • Site of the Week
    • Useless
    • Xbox
      • Games
You are here: Home / Support / MicroSoft / Remote Shutdown, Oh how I love thee…

Remote Shutdown, Oh how I love thee…

June 17, 2009 By Robert Owen

I manage a few Windows Servers across my VPN… Updating software, OS, and managing backups, etc. And, sometimes when you are installing an update that requires a reboot things can get a little complicated. Especially, if that server has a lot of services running and you are logged in via Remote Desktop. If there a lot of services that have to be shut down, sometimes the server can hang in the process… Cutting your remote session but not finishing the reboot process.

So… enter shutdown.exe. Shutdown.exe is a command line tool that can be used to shutdown and/or reboot local or remote servers. (Granted you have administrative privileges) You can use shutdown.exe two ways. By command line and the Graphic user inteface. If you want to try the command line approach, Shutdown.exe uses the following syntax:

shutdown \\computername /l /a /r /t:xx “msg” /y /c
.
command line activation
You can use the following switches with Shutdown.exe:
  • \\computername: Use this switch to specify the remote computer to shut down. If you omit this parameter, the local computer name is used.
  • /l (Note that this is a lowercase “L” character): Use this switch to shut down the local computer
  • /a: Use this switch to quit a shutdown operation. You can do this only during the time-out period. If you use this switch, all other parameters are ignored.
  • /r: Use this switch to restart the computer instead of fully shutting it down.
  • /t:xx: Use this switch to specify the time (in seconds) after which the computer is shut down. The default is 20 seconds.
  • “msg“: Use this switch to specify a message during the shutdown process. The maximum number of characters that the message can contain is 127.
  • /y: Use this switch to force a “yes” answer to all queries from the computer.
  • /c: Use this switch quit all running programs. If you use this switch, Windows forces all programs that are running to quit. The option to save any data that may have changed is ignored. This can result in data loss in any programs for which data is not previously saved.

Examples

  • To shut down the local computer in two minutes and display a “The computer is shutting down” message, use the following line in a batch file or type it at a command prompt, and then press ENTER:
    shutdown /l /t:120 “The computer is shutting down” /y /c

    To cancel the shutdown process, type the following line at the command prompt, and then press ENTER:

    shutdown /l /a /y
  • To shut down and restart a remote computer named “Support,” use the following line in a batch file or type it at a command prompt, and then press ENTER:
    shutdown \\support /r
  • To schedule the local computer to shutdown and restart at 10:00 P.M., type the following line at a command prompt, and then press ENTER:
    at 22:00 shutdown /l /r /y /c
  • To schedule the local computer to shutdown and restart at 6:00 P.M. every weekday, type the following line at a command prompt, and then press ENTER:
    at 18:00 /every:M,T,W,Th,F shutdown /l /r /y /c

Now you can also do the same thing with the Graphic interface. To activate the GUI Open a command prompt and type: shutdown /i you will then be presented with a window that will look like this:

shutdown gui

From the dropdown menus you can choose equivalent selection for the command line switches. Using this method to reboot the remote server takes the Remote Desktop out of the active services list and has been a great help in reliably rebooting the remote servers. This is a great help when you cannot get physically to the server Console and perform the reboot. This command line utility is present in Windows XP, Sever 2003, Windows Vista and Windows 7. I’ve not attempted this from a Server 2008 machine yet but, if it is not available there I will update you.

© 2009, Robert Owen. All rights reserved.

Related posts:

Default ThumbnailRemote Desktop Default ThumbnailRemote Desktop /console change in Vista SP1 Default ThumbnailRemote Desktop Slow in Vista Default ThumbnailMS Office Alternative!

Filed Under: MicroSoft, Software Tagged With: Administrative Privileges, Batch File, Cancel, Command Line Tool, Computer C, Computer Name, Computer Support, Graphic User, Inteface, Local Computer, Love, Love Exe, Lowercase, Maximum Number, Parameters, Queries, Remote Computer, Remote Desktop, Remote Shutdown, Running Programs, Switch Windows, Switches, Syntax, T 120, Time Out, Tool, Two Minutes, Two Ways, Updating Software, Vpn, Windows Servers

Robert Owen A Horn Player turned salesman, turned Computer Consultant & Horn Player, Turn Network Engineer & Horn Player, Now Technology leader & Musician.... Well, How about a Horn player who does a lot of other stuff? More about me. FacebookInstagramLinkedInTwitter

To Stay up-to-date on all of my crazy Ramblings, enter your e-mail address below.

You'll be amazed!

Recent Posts…

  • What If? – Gig Edition
  • Feedback – two way street
  • Snow-pocalypse… and Cold
  • Snow-pocalypse 2025 – part 6
  • Snow-pocalypse 2025 – part 5

Recent Comments

  • David Gray on Create a Shortcut to open in your Alternate BrowserTwelve years on, this tip remains useful. Though I…
  • Sue K on Use the Snipping Tool to Capture MenusThanks you so much! I could never figure out how t…
  • aa on Increase IIS File Upload LimitsSuperb Robert..after wasting 2 days..this is perfe…
  • León on Windows 7 error 86Funciono para Windows 7 , también descubrí que la…
  • Nicole Larkin on Use the Snipping Tool to Capture MenusNine years later and your post is still helpful. T…

[footer_backtotop]
Content Copyright © 2025 OWEN CONSULTING · All Rights Reserved · Log in