Shutdown a local or remote computer with Shutdown.exe
Saturday, November 21st, 2009 | Author: Mike
Shutdown.exe is included in pretty much any recent version of the Windows OS including Windows 2000, XP, 2003, Vista, 2008 and 7. Shuftdown.exe is a great program that can be used by system administrators to shutdown local computers through a batch file or even shutdown remote machines or servers using different switches.
The shutdown command it typically stored in the c:\windows\system32\ folder as shutdown.exe
Syntax:
Shutdown.exe [logoff_option] [/m \\computername ] [option]
logoff option:
- /i
- Display the GUI (must be the first option)
- /l
- Log Off. This cannot be used with /m or /d option
- /s
- Shutdown
- /r
- Shutdown and Restart
- /a
- Abort a system shutdown (only during the time-out period)
- /p
- Turn off the local computer with no time-out or warning (only with /d)
- /h
- Hibernate the local computer (only with /f)
- /e
- Document the reason for an unexpected shutdown of a computer
Options:
- /m \\computername
- A remote computer to shutdown
- /t:(0-600)
- Time until system shuts down in seconds. 0-600 (default=30)
- /c “Message”
- An optional shutdown message with a max of 127 characters
- /f
- Force all running applications to close. This will result in lost of unsaved data
- /d u:xx:yy
- List a USER reason code for the shutdown
- /d P:xx:yy
- List a PLANNED reason code for the shutdown
Example:
This example will shut the server down in 60 seconds and display a message
shutdown.exe /s /t:60 /c “This computer will shutdown in 60 seconds”
This example will shut the server down in the default time, 30 seconds
shutdown.exe /s

