There are many options available for shutting down Windows from the command line that are not available by clicking on GUI. Today in this article we will learn how to shutdown Windows from the command line. So let’s start.
First click in start and type cmd. You will see the option of command prompt. Click into it. This will open the command prompt. You can also open the run command dialog box by pressing Windows + R key and then write cmd in it and press Enter. This will also open the command prompt.
Now give this command to shutdown shutdown /s this will shut down your computer in few minutes.
If you want to restart the computer, then enter this command: shutdown /r
shutdown /i This command opens the dialog for remote shutdown. This allows you to shutdown any other computer in the network
shutdown /l You can log off with this command.
shutdown /s /t 60 If you use the /t flag, you can set a shutdown or restart timer. For example, this command will shutdown your computer after 60 seconds. If you don’t set the time, it will take default value of 30 seconds.
shutdown /? This will display all the options related to shutdown command.
For more information, see: https://docs.microsoft.com/en-us/windows-server/ administration/windows-commands/shutdown