Wednesday, May 27, 2009

Command-line remote windows restart/shutdown

If you're running a windows machine and would like to restart (or shutdown) a remote windows machine, just type the following at your command line (Start-> Run -> "cmd" [enter]):
  • shutdown -r -m \\xxx.xxx.xxx.xxx
where '-r' reboots the machine (remove that to just shut down the machine) and replace the xxx.xxx.xxx.xxx with the remote machine's IP address.

Alternatively, you may connect to the machine through Remote Desktop Connection, and run the following from the command line:
  • shutdown -r -f
You can also obtain a list of commands by typing the following from any windows command line:
  • shutdown -?

1 comment:

Mr. Carney said...

Doesn't this have to be done from a domain controller?