Windows operating systems Windows XP, Windows 7, Windows 8, Windows 10, and Windows Server provides the
shutdown command in order to restart the computer from the command line. Restart operation will stop all actively running applications and kill the running process in 30 seconds after the reboot command issued.
Reboot/Restart Windows Computer
The boot is the name of the starting a computer or system and reboot means starting the computer or system again after a shutdown. The start has the same methodology where the system will shut down and then restart which will simply be called a restart. Windows operating systems provide the shutdown command in order to shut down or reboot a computer. In order to reboot or restart a Windows computer, the /r options should be added to the shutdown command. After 30 seconds of the command execution, the shutdown process will start. This delay is provided to close open applications and save works.
C:> shutdown /r
Alternative a remove system can be rebooted or shutdown by providing the remote computer IP address or hostname with the
/m option like below. In the following example we will reboot the remote system with the IP address 192.168.10.10 .
C:> shutdown /r /m \\192.168.10.10
If you have DNS system you can also specify the remote system domain name like below according to the IP address.
C:> shutdown /r /m \\dc.windowstect.com
Reboot/Restart Windows Computer with Delay
By default, the shutdown operation will start after 30 seconds the command is executed. We can simply say that delay is 30 seconds which can be used to close applications and save changes. But in some cases, you may need more time where you can set the delay with the /t option. This option is called a timeout. In the following example, we will set the reboot/restart delay as 120 seconds which will be enough for most of the cases.
C:> shutdown /r /t 120
Abort Reboot or Restart Operation
When the reboot/restart command executed there are 30 seconds for the reboot process. If you want to cancel or abort the reboot/restart process you can use the shutdown command with the
/a option. This will cancel the currently active reboot process but if the reboot process already started it won’t work.
C:> shutdown /r /t 120
Force Computer Reboot/Restart
You can force the reboot or restart process by using the
/f option which will close all open applications and reboot system without saving changes.
C:> shutdown /r /f
Add Note For Reboot/Restart
Even generally not used by end-users while using for the windows server we can add a note for the restart. Generally, the cause of the restart or reboot is provided by using the /c option. the message or note is also called a comment. This comment should be put inside double quotes and shouldn’t be longer than 511 characters.
C:> shutdown /r /c "Some updates are installed"
Open GUI For Reboot/Restart
The reboot or start can be done via a GUI where this GUI can be opened easily from the command-line with the
/i option like below. But this interface is mainly designed for the active directory where computers can be added via AD. You can also put some comments or notes about the restart.
C:> shutdown /i
Reboot/Restart using WMIC
The computer or system can be rebooted or restarted via wmic interface command like below.
C:> wmic os where Primary="True" reboot