5
If you want to shut down your computer via the command prompt (cmd), you need to know the necessary commands.
Windows: Commands for shutting down via cmd
The shutdown command in Windows is used to manage the computer status via the command prompt (cmd). This command line allows you to shut down the computer at different times, restart it, or control system services. Windows uses a series of parameters and options that allow users and administrators to specify exactly how and when the system should be shut down.
- To shut down the computer, you can start the command prompt in normal mode. To do this, press the key combination [Windows] + [R]. Enter “cmd” and confirm with [Enter]. Alternatively, you can also start the command prompt as an administrator. The following commands can be used to shut down the computer:
- shutdown /s: The PC will shut down immediately. This is a complete shutdown of the Windows session, closing all active applications and processes.
- shutdown /s /t 60: The PC will shut down in 60 seconds. You can replace the time specification with any number.
- shutdown /r: The PC will restart.
- shutdown /a: The shutdown will be canceled.
- shutdown /i: The remote PC is shut down. However, some preparation is required before you can shut down the PC remotely. First, make sure that the firewall on the remote PC allows incoming connections for the shutdown command. The user on the remote PC must also have administrator rights and have enabled remote access for the shutdown function.
- shutdown /g: The PC will be shut down and all programs will be reopened automatically after restarting.
- shutdown /l: The current user is logged off.
- shutdown /f: Running applications are forced to close.
- shutdown /c “Comment”: A comment is also added. This can be helpful if several administrators are working on a system and logging system events is important.