Home NT Commands
NT Syntax
SHUTDOWN.exe (Resource Kit now a standard command in XP)

Shutdown the computer

Syntax for NT/2K (see below for XP)

      SHUTDOWN [\\Computer] [/L] [/A] [/R] [/T:xx] ["Msg"] [/Y] [/C] 

key
   \\Computer  : A remote computer to shutdown.
/L : A local shutdown.(under XP this is a logoff only) "Msg" : An optional shutdown message
/R : Shutdown and reboot /T:xx : Set the timer for system shutdown in seconds.[20 sec. default] /A : Abort a system shutdown during the timeout period. /Y : Answer all following questions with yes /C : Force running applications to close. ATTENTION: If you use the /C parameter shutdown will not prompt for File-Save in any open applications. This will result in a loss of all unsaved data!!! Syntax for Windows XP: SHUTDOWN [options] [-m [\\ComputerName]] options -M \\Computer : A remote computer to shutdown.
-L : logoff current user -c "Msg" : An optional shutdown message
-S : Shutdown -R : Shutdown and reboot -A : Abort a system shutdown during the timeout period. -T:xx : Set the timer for system shutdown in seconds.[20 sec. default] -F : Force running applications to close. ATTENTION: If you use the -F parameter shutdown will not prompt for File-Save in any open applications. This will result in a loss of all 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. xx Specifies the major reason code (0-255) yy Specifies the minor reason code (0-65536)

When using this command to reboot a server - the shutdown can be made faster if the services are halted using NET STOP - the NT shutdown process will normally allow about 30 seconds to ensure each running service has time to stop.
e.g.

net stop "Microsoft Exchange Internet Mail Service"
net stop "Microsoft Exchange System Attendant" /y
wait 20
shutdown /Y /T:5 /C /R

"The man who is tired of London is tired of looking for a parking space" - Paul Theroux

Related Commands:

SHUTGUI - A GUI version of SHUTDOWN.exe
LOGOFF - Log off a user.
BootCFG - Edit Boot.ini settings.

PowerOff - 3rd party utility to shut the power off completely (NT / 2K)

Equivalent Linux BASH commands:



Simon Sheppard
SS64.com