The shutdown command is a Windows command line tool used to shut down, restart, log off, or hibernate a local or remote computer. It can also be used to schedule a shutdown or reboot of a local or remote computer. The shutdown command is available in all versions of Windows, from Windows 95 to Windows 10.

What is the Syntax of the Shutdown Command?

The syntax of the shutdown command is as follows:

  • shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f] [/m \\computer] [/t xxx] [/d [p|u:]xx:yy] [reason]

The parameters used in the shutdown command are as follows:

  • /i: Displays the graphical user interface (GUI).
  • /l: Logs off the current user.
  • /s: Shuts down the computer.
  • /r: Reboots the computer.
  • /g: Reboots the computer and restarts any registered applications.
  • /a: Aborts a system shutdown.
  • /p: Powers off the computer.
  • /h: Puts the computer into hibernation.
  • /e: Document the reason for an unexpected shutdown of a computer.
  • /f: Forces running applications to close without warning.
  • /m \\computer: Specifies the target computer.
  • /t xxx: Sets the time-out period before shutdown to xxx seconds.
  • /d [p|u:]xx:yy: Sets the reason code for the shutdown.
  • reason: Specifies a message to be displayed in the shutdown dialog box.

How to Use the Shutdown Command?

The shutdown command can be used to shut down, restart, log off, or hibernate a local or remote computer. It can also be used to schedule a shutdown or reboot of a local or remote computer.

To shut down a local computer, open the Command Prompt window and type the following command:

shutdown /s

To shut down a remote computer, open the Command Prompt window and type the following command:

shutdown /m \\computer /s

Where \\computer is the name of the remote computer.

To reboot a local computer, open the Command Prompt window and type the following command:

shutdown /r

To reboot a remote computer, open the Command Prompt window and type the following command:

shutdown /m \\computer /r

Where \\computer is the name of the remote computer.

To log off a local computer, open the Command Prompt window and type the following command:

shutdown /l

To log off a remote computer, open the Command Prompt window and type the following command:

shutdown /m \\computer /l

Where \\computer is the name of the remote computer.

To hibernate a local computer, open the Command Prompt window and type the following command:

shutdown /h

To hibernate a remote computer, open the Command Prompt window and type the following command:

shutdown /m \\computer /h

Where \\computer is the name of the remote computer.

Examples of the Shutdown Command

The following are some examples of how the shutdown command can be used:

  • To shut down a local computer after 60 seconds, open the Command Prompt window and type the following command: shutdown /s /t 60
  • To shut down a remote computer after 60 seconds, open the Command Prompt window and type the following command: shutdown /m \\computer /s /t 60
  • To reboot a local computer after 60 seconds, open the Command Prompt window and type the following command: shutdown /r /t 60
  • To reboot a remote computer after 60 seconds, open the Command Prompt window and type the following command: shutdown /m \\computer /r /t 60
  • To log off a local computer after 60 seconds, open the Command Prompt window and type the following command: shutdown /l /t 60
  • To log off a remote computer after 60 seconds, open the Command Prompt window and type the following command: shutdown /m \\computer /l /t 60
  • To hibernate a local computer after 60 seconds, open the Command Prompt window and type the following command: shutdown /h /t 60
  • To hibernate a remote computer after 60 seconds, open the Command Prompt window and type the following command: shutdown /m \\computer /h /t 60

Conclusion

The shutdown command is a Windows command line tool used to shut down, restart, log off, or hibernate a local or remote computer. It can also be used to schedule a shutdown or reboot of a local or remote computer. The shutdown command is available in all versions of Windows, from Windows 95 to Windows 10.

The syntax of the shutdown command is as follows:

shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f] [/m \\computer] [/t xxx] [/d [p|u:]xx:yy] [reason]

The shutdown command can be used to shut down, restart, log off, or hibernate a local or remote computer. It can also be used to schedule a shutdown or reboot of a local or remote computer.

The examples provided in this article demonstrate how the shutdown command can be used to shut down, restart, log off, or hibernate a local or remote computer.

Leave a Reply