Remotrly shutdown a windows server

Author: - Dinesh Aggarwal

From the command line you can shutdown or restart any windows 2003 server, windows XP, windows Vista and Windows 2000/NT servers. You simply need to use shutdown.exe command.

Following options are available in the shutdown command of windows 2003 server

Usage: shutdown [/i | /l | /s | /r | /a | /p | /h | /e] [/f] [/m \\computer][/t xxx][/d [p:]xx:yy [/c "comment"]]


Display help. This is the same as not typing any options


Display the graphical user interface (GUI).This must be the first option


Log off. This cannot be used with /m or /d option.


Shutdown the computer


Shutdown and restart the computer


Abort a system shutdown. This can only be used during the time-out period


Turn off the local computer with no time-out or warning. This can only be used with /d option


Hibernate the local computer. This can only be used with the /f option


Document the reason for an unexpected shutdown of a computer

/m \\computer

Specify the target computer

/t xxx

Set time-out period before shutdown to xxx seconds. The valid range is 0-600, with a default of 30

/c "comment"

Comment on the reason for the restart or shutdown. Maximum of 127 characters allowed


Force running applications to close without forewarning users

/d [p:]xx:yy

Provide the reason for the restart or shutdown.

p indicates that the restart or shutdown is planned

xx is the major reason number (positive integer less than 256)

yy is the minor reason number (positive integer less than 65536)


Example 1:- Shutdown /r /m \\

The above command will reboot a remote windows server having IP address 10.10.10. Please note that the shutdown command is not case sensitive.

Example 2:-After you issue the /s or /r, a dialog box appears with a 30 second count down. During this timeout period you can issue shutdown /a command to abort the shutdown. This is very useful is someone entered the shutdown command by mistake.

Shutdown /t  command is used for specifying the time.  30 seconds is the default count down time. By using /t option you can specify a maximum time to 600 seconds.   

If you have any suggestions or want to add more to this article do write us an email


What Next?

If you liked this article, you can share it with others using the following link:

Related Content :