Clicky

Shutdown Windows Using Command Prompt Remotely

An often overlooked command in Windows is to shutdown the computer using command prompt or batch scripting. This can be useful for shutting down a computer remotely, rebooting a computer while logged in via remote desktop or setting a scheduled task to shutdown your pc at a specified time every day

The Shutdown Command

  • First click start, then run and type cmd and OK
  • This will open command prompt and allow you to input the shutdown command
  • Shutdown uses the following syntax:
shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]

Wow! thats confusing, lets break it down into the command and what the switches do

  • Typing shutdown without any switches will show you the following list of switches:
shutdown cmd
  • The most common switches to use are
  • This will shutdown the computer:
shutdown -s

  • This will reboot the computer:
shutdown -r

  • This will shutdown the computer after 10 seconds(Default is 30):
shutdown -s -t 10

  • This will shutdown the remote computer PC001:
shutdown -s -m \\PC001

  • This will shutdown the computer with the comment “autoreboot”:
shutdown -s -c "autoreboot"

Now you know the switches and how to shut off your pc or a remote pc give it a go. Remember that you need administrative permissions on the machine your are shutting down.