Usually Windows users prefer to shutdown, reboot / restart and log off using GUI. This is an easy method followed by the most of the Windows users. You may require to manage your Windows Server or system via command line. In that event, it requires to manage this using shutdown commands or restart command via Windows command line (CMD).
In this article, we will discuss about shutdown command and restart command with different options using Windows command line.
Shutdown commands for Windows
In Windows, you can use several commands to shutdown, restart, or put the system into other power states mode. Here are some common shutdown commands:
Basic Shutdown Command
You can use the following command to shutdown your Windows system:
shutdown /s
Immediate Shutdown
To immediately shutdown windows system without any delay or warning, you can use /p argument as follow:
shutdown /p
Shutdown Windows System after xx Seconds
To shutdown Windows system after certain seconds, you can use the following command:
shutdown /s /t 60
The argument after /t is in seconds.
Force Shutdown Windows system
You can use /f argument to forcefully shutdown your Windows system. This will close the running application abruptly without any warning or notice:
shutdown /s /f
Abort a Scheduled Shutdown
If you have scheduled a shutdown or shutdown timer is running, you can abort it with /a argument:
shutdown /a
Restart command for Windows
To restart your Windows system, you can use the following restart command:
shutdown /r
If you wish to just log off the user, you can use the following command:
shutdown /l
Using the above shutdown commands and reboot command, you can manage shutdown or restart for your Windows system or Windows server using the Windows command line.
If you are looking for other articles, you may search it from our knowledge base.