How To Shutdown Windows From Command Line with Shutdown Command Examples and Tutorial – POFTUT

How To Shutdown Windows From Command Line with Shutdown Command Examples and Tutorial

Windows operating systems provide the commandshutdown which has a lot of functions like a reboot, shutdown, logoff etc. In this tutorial, we will look most useful of them. Windows XP is a very old operating system where it may lack some of the options and features described here. We will use tocmd.exe run from CLI.

Syntax

shutdown command syntax is like below.

  • OPTIONS is used for different type of options like restart, logoff etc.
  • COMPUTER is used when we need to run shutdown command on the remote computer
  • COMMENT is used with comment feature to provide message

Shutdown System

Now the main purpose of the commandshutdown is shutting down the system or computer. Just providing the commandshutdown is not enough. We should provide the option/s in order to shut down the system.

Restart System

We can also restart the system with the commandshutdown. We will provide the option/r in order to restart the system or computer. This will shut down and restart the computer.

Logout From Current GUI Session

If we have logged in with the GUI we may need to log out from the current session. We will use the option /l in order to log out from the current user session.

Abort System Shutdown

By default when we issue shutdown command the computer will not shut down immediately. There are 60 seconds wait time before shutdown. We can cancel the shutdown operation with which/a means abort.

LEARN MORE  How To Use "shutdown r" Command In Windows To Reboot and Shutdown Computer?

Hibernate System

Hibernate feature will make computer sleep and wake up in seconds without starting from scratch. We can hibernate the computer with the option/h like below.

Send Message To System Users

A typical server will be used more than one person. There may be other persons who are using server currently. We need to provide information about a shutdown, restart. We can use the option/c with the message. The message will be put into double quotes.

Specify Time or Interval For  Shutdown and Restart

Default shutdown interval or time may be enough for us or other computer and system users. We can specify the interval we need with the option/t and time value. In this example, we will specify a waiting time for 120 seconds for the shutdown. Merging this option with send message will be very useful.

Leave a Reply

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