This article describes how to use the remote shutdown.exe tool to shut down or restart a local or remote computer based on Windows 2000 or Microsoft Windows NT 4.0.
Shutdown.exe is provided with Microsoft Windows 2000 Resource Kit. This command line tool can be used to shut down or restart a local or remote computer that is running Windows 2000 or Windows NT 4.0. If you want to schedule the computer to be shut down and restarted at a specific time, use the shutdown.exe tool in combination with the AT command or task scheduler to describe shutdown.exe using the following syntax: shutdown \\Computername/L/A/R/T:Xx"MSG"/Y/C can use the following switch for shutdown.exe:
- \ Computername: This switch is used to specify the remote computer to be disabled. If you omit this parameter, the local computer name is used.
- /L (please note that this is the lowercase "L" character): this switch is used to turn off the Local Computer
- /A: This switch is used to exit shutdown. This can only be executed during the timeout period. If you use this switch, all other parameters are ignored.
- /R: This switch is used to restart the computer instead of shutting it down completely.
- /T:Xx: This switch is used to specify how long (in seconds) the computer is disabled. The default value is 20 seconds.
- "MSG": This switch is used to specify the message displayed during the shutdown process. The message can contain a maximum of 127 characters.
- /Y: this switch is used to force the answer "yes" to all queries on the computer ".
- /C: this switch is used to exit all running programs. If you use this switch, Windows will force all running programs to exit. The option used to save any data that may have been changed will be ignored. This may cause data loss in any program that has not previously stored its data.
Example
- To disable the Local Computer and display the "the computer is shutting down" Message two minutes later, use the following line in the batch processing file or type this line at the command prompt, and then press Enter: shutdown/L/T: 120 "the computer is shutting down"/y/C to cancel the shutdown process, type the following line at the command prompt and press Enter: shutdown/L/A/y
- To disable and restart the remote computer named "support", use the following line in the batch file or type this line at a command prompt, and then press Enter: shutdown \ support/R
- To schedule the local computer to shut down and restart at, type the following line at the command prompt and press Enter: at shutdown/L/R/y/C
- To enable the local computer to shut down and restart at every working day, type the following lines at the command prompt and press Enter: AT/every: M, T, W, th, F shutdown/L/R/y/C
Troubleshooting
When you use shutdown.exe to shut down a specified computer, the computer may not be shut down. This issue may occur if the unlock computer dialog box appears on the desktop or the computer is locked. For more information about how to solve this problem, click the following article number to view the article in the Microsoft Knowledge Base:
307635 (http://support.microsoft.com/kb/307635/) Remote Shutdown resulted in cancellation of 288180 (http://support.microsoft.com/kb/288180/) exitwindowsex () when the unlock computer dialog box is displayed () the function cannot log off the user or shut down the computer for more information about shutdown.exe when the computer locks. Please type shutdown/? at the command prompt /?, Then press Enter.