Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Execute a System Shutdown via CMD on Windows

In the Windows operating system environment, "desligamento" refers to the process of shutting down the computer. Windows provides several methods to execute a shutdown, including using the graphical interface, but one of the most powerful and flexible ways is through the Command Prompt (CMD). This method is particularly useful for automation and scripting purposes.

Examples:

  1. Basic Shutdown Command: To shut down your computer immediately, you can use the following command in CMD:

    shutdown /s /t 0
    • /s specifies that you want to shut down the computer.
    • /t 0 sets the time-out period before shutdown to zero seconds, meaning the shutdown will occur immediately.
  2. Scheduled Shutdown: If you want to schedule a shutdown after a specific amount of time, use the /t parameter followed by the number of seconds to wait:

    shutdown /s /t 3600

    This command will shut down the computer after one hour (3600 seconds).

  3. Cancel a Scheduled Shutdown: If you have scheduled a shutdown and need to cancel it, use the following command:

    shutdown /a
    • /a stands for "abort," and it will cancel any pending shutdown.
  4. Shutdown with a Custom Message: You can also display a custom message to users before the shutdown occurs:

    shutdown /s /t 60 /c "The system will shut down for maintenance."
    • /c allows you to specify a comment or message that will be displayed to users.
  5. Restart Instead of Shutdown: If you need to restart the computer instead of shutting it down, replace /s with /r:

    shutdown /r /t 0

    This command will immediately restart the computer.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.