Ok Bloggers and bloggees, this next tip should be useful for those serious network technicians:
Action: You have a client that needs their server(s) shutdown, but nobody on staff knows the location of the server, let alone the location of the power button on said server.
Re-Action: If you can remote onto their server (or any machine on their network), try entering this line in the Run field:
It will open a window called Remote Shutdown Dialog. Within this window you will have the options of which machines you want to effect, which actions you want to take, and how long the shutdown message will be displayed.
If you want to take it one step further, try the following switches with the Shutdown command:
- computername: This switch is used to specify the remote computer(s) you wish to shut down. You can also enter the IP address in this field. If this switch is omitted, the local computername is used.
- /l (Note 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. When using this switch, all other parameters are ignored.
- /r: Use this switch to restart the computer instead of shutting it down.
- /t:xx: Use this switch to specify the time (in seconds) when the computer will shut down. Default is 20 seconds.
- “msg”: Use this switch to display a message during the shutdown process. The maximum number of characters that can be contained in this message is 127.
- /y: Use this switch to force a “yes” answer to all queries from the computer.
- /c: Use this switch to quit all running programs. If this switch is used, Windows forces all programs that are running to quit. There is no save option and any changes that have been made are ignored.
- To shut down the local computer in two minutes and display a “The computer is shutting down in 2 minutes, please log out immediately” 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 in 2 minutes, please log out immediately” /y /c
- To schedule a shutdown of a computer named “James” and restart at 10:00PM, type the following line at a command prompt, and then press ENTER:
- at 22:00 shutdown James /r /y /c
- To schedule the shutdown of a computer with the ip of “256.256.256.256” and restart at 6:00PM every weekday, type the following line at a command prompt, and then press ENTER:
- at 18:00 256.256.256.256 /every:M,T,W,Th,F shutdown /r /y /c