Computer administrators are familiar with various Windows DOS commands. These commands are very useful for network administrators to shutdown Windows remotely via command line. Today, I am going to share some useful computer shortcuts to shutdown computer with command prompt remotely and locally. This includes shutdown, restart, logoff, and close all application using command prompt.
In order to execute any of these commands first go to command prompt: Start > Run > (Type “cmd” in run window and hit enter OR Press Windows Key + R.
Windows shutdown command for Local Computer
- How to Specify the time in command line while shutting down the Windows
shutdown -s -t 120
Here “-t” specifies time for Windows shut down time. You will get a new pop up appears saying “Windows will shut down in 2 minutes?”
- How to abort Windows Shutdown using Command line
When you receive a shut down prompt you can abort this process by typing “shutdown -a” in command prompt, In windows 7 a pop up appears saying “Logoff cancelled”.
- Remote Shutdown Windows Commands
shutdown -s -m \\computername -t 60
Here we include “-m” to shutdown remote computer on the network and for “computername” you can specify the computer name or IP address of the remote computer. “-t 60 indicates within 60 seconds computer will shutdown. Note: Remote shutdown for Windows is possible only with admin rights.
- Add a comment while Shutting down the Remote Computer.
shutdown -s -t 120 -c “I am going to shut down your computer remotely”
You can include reason for windows shut down by just adding “-c” and the message.
- Windows Restart Command for Remote Computer
shutdown -r -m \\computername
Here we use “-r” to restart the computer. “computername” you can specify the computer name or IP address of the remote computer.
Windows Command Prompt Shutdown Command List
|-t xx||”xx” specify number of seconds to shutdown Windows|
|-a||Abort Windows shutdown which is already in progress|
|-r||Windows restart command|
|-s||Windows shutdown command|
|-f||This command forces the existing applications to close without warning|
|-c||You can leave a comment or message while Shutting down down the windows.|
|m \\computername||This command is used to access remote computers.|
Shutdown Command Line Examples:
Type: shutdown –m \\computername –r –f
This command will restart the remote computer and forces all the application to close.
Type: shutdown –m \\computername –r –f –c “I am going to restart your computer now. Please save all the files ” –t 120
This command display’s a message to remote user and it will shut down in 2 minutes.