No announcement yet.

Shutdown commands for Windows


Unconfigured Ad Widget

  • Filter
  • Time
  • Show
Clear All
new posts
    Rachel S

  • Rachel S
    To make use of various shutdown codes in the Windows command line, it is essential to input the exact designations and control parameters following the appropriate command syntax. The standard syntax for executing these commands is as follows:

    shutdown /Parameter

    Essential Commands for shutdowns via CMD
    • shutdown /s: Shutdowns PC immediately
    • shutdown /a: Aborts shutdown
    • shutdown /r: Restarts computer
    • shutdown /l: Logs off current user
    • shutdown /f: Force shutdown is a command that compels running applications to close abruptly without providing a warning to the user.

    These commands execute immediately without requiring additional formulation. However, complex shutdown procedures may necessitate a more comprehensive syntax. Here are a few examples:
    • shutdown /s /t 20
      To shut down the local PC in 20 seconds, you can utilize the "/t" parameter to specify the time until shutdown.
    • shutdown /r /m \\Computername
      Restarts a remote PC(preparations may be necessary, such as assigning access rights for remote control or modifying Firewall settings)
    • shutdown /r /m \\Computername /c "comment"
      Restarts a remotely operated PC and use the /c parameter to display a blue text box on the screen of the targeted PC.
    /i: The "Remote Shutdown" box is presented when the command is executed with the /i option as the first parameter. If the /i option is used, all other options are ignored.

    /l: The command "log off" immediately terminates the current user session without any time-out period. Please note that the /l option cannot be used with /m or /t.

    /s: used to shut down the computer.

    /sg: utilized to shut down the computer. Upon the next boot, the device will automatically sign in and lock based on the last interactive user if the Automatic Restart Sign-On feature is enabled. After signing in, any registered applications will restart.

    /r: To restart the computer after initiating the shutdown process.

    /g: Shutdowns the computer. Upon the next restart, if the Automatic Restart Sign-On feature is enabled, the device will automatically sign in and lock based on the last interactive user. After signing in, any registered applications will be restarted.

    /a: To cancel an ongoing system shutdown. This command can only be executed during the time-out period. To clear any pending boots to firmware, you can combine it with the /fw.

    /c <comment>: Allows you to provide a detailed comment regarding the reason for the shutdown. To specify the reason, you should use the "/d" option, and your comments must be enclosed within quotation marks. Please note that a maximum of 511 characters can be used for the comment.

    These examples showcase only a selection of parameters accessible with the "shutdown" command. Type "shutdown /?" in the command prompt for a comprehensive list of parameters and their descriptions. This command will provide an extensive compilation of options and details to explore.

    Leave a comment:

  • Annie_P
    started a topic Shutdown commands for Windows

    Shutdown commands for Windows

    Which are the essential Windows commands for shutdowns through the command line? Can anyone explain commands and their parameters?