This article will show you how to use the Remote Shutdown tool (Shutdown.exe) to shut down and restart a local or remote Windows 2000-based or Microsoft Windows NT 4.0-based computer.
Note Shutdown.exe for Windows 2000 is no longer supported and is not available for download from Microsoft. This tool is available on the original Microsoft Windows 2000 Resource Kit CD-ROM only.
Remote Shutdown Overview
Firstly, in order to remotely shutdown a computer on your network, you’ll need to make sure you have Administrative access to that computer. If you’re on a home network, the best way to do this is to make sure all computers are in the same workgroup and that they all have at least one Administrator account with the same user name and password.
You can also have different Administrator account names across computers, but then you’ll need to make sure you add the Administrator account of one computer to the account list on the other computers. You’ll also need to know all the names of the other computers on the network. You can do that by going to Control Panel and then clicking on System. Then click on the Computer Name tab.![]()
Description of the Shutdown.exe Tool
Shutdown.exe uses the following syntax:
shutdown \\computername /l /a /r /t:xx "msg" /y /c
You can use the following switches with Shutdown.exe:
* \\computername: Use this switch to specify the remote computer to shut down. If you omit this parameter, the local computer name is used.
* /l (Note that this is a lowercase "L" character): Use this switch to shut down the local computer
* /a: Use this switch to quit a shutdown operation. You can do this only during the time-out period. If you use this switch, all other parameters are ignored.
* /r: Use this switch to restart the computer instead of fully shutting it down.
* /t:xx: Use this switch to specify the time (in seconds) after which the computer is shut down. The default is 20 seconds.
* "msg": Use this switch to specify a message during the shutdown process. The maximum number of characters that the message can contain is 127.
* /y: Use this switch to force a "yes" answer to all queries from the computer.
* /c: Use this switch quit all running programs. If you use this switch, Windows forces all programs that are running to quit. The option to save any data that may have changed is ignored. This can result in data loss in any programs for which data is not previously saved.
Examples
* To shut down the local computer in two minutes and display a "The computer is shutting down" message, use the following line in a batch file or type it at a 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 then press ENTER:
shutdown /l /a /y
* To shut down and restart a remote computer named "Support," use the following line in a batch file or type it at a command prompt, and then press ENTER:
shutdown \\support /r
* To schedule the local computer to shutdown and restart at 10:00 P.M., type the following line at a command prompt, and then press ENTER:
at 22:00 shutdown /l /r /y /c
* To schedule the local computer to shutdown and restart at 6:00 P.M. every weekday, type the following line at a command prompt, and then press ENTER:
at 18:00 /every:M,T,W,Th,F shutdown /l /r /y /c
Remote shutdown via Command Prompt
The shutdown command is most flexible when using it from the command prompt because you can add a bunch of switches to it, which allow you to customize the behavior. Go to Start, then Run, and type in CMD. In the black command window, type in shutdown /? to see the list of switches.
You have to use at least one switch in order for the command to do anything. Basically you would type in shutdown -X -Y -Z where X, Y, Z are letters in the list above.
Here are a couple of the most command switches and what actions they peform:
-l: Logs off the computer
-s: Shuts down the computer
-r: Restarts the computer
-m \\computername: remote shutdown of a computer
-f: Forces programs to close immediately
So for remotely shutting down another machine on your network, you would type into the command prompt the following commands:
Try:
shutdown –m \\computername –r –f
This above command will restart the computer named computername and force all programs that are still running to die
shutdown –m \\computername –r –f –c “The computer will restart, please save all work.” –t 60
This command will restart the computer named computername, force all programs that are running to die, show a message to the user, and countdown 60 seconds before it restarts.
Remote Shutdown via Batch File
Finally, you can create a batch file so that you can do all of this by just clicking on a file! Or you can even schedule the batch file to be run at specific intervals using Windows Scheduler.
Just go to Notepad and type in the commands you would have typed into the command prompt:
shutdown –m \\computername1 –r
shutdown –m \\computername2 –r
shutdown –m \\computername3 –r
This will restart three computers on my home network. You would of course replace computername1 with the actual names of your computers. Then simple save the file with a .BAT file extension. You can put as many commands into the batch file as you like, so feel free to experiment!
Source: support.microsoft.com/kb/317371








