Thursday, December 28, 2006

Shutdown a remote server

Often at work I need to reboot a remote server.  I remember this being something that I worked on at Harley-Davidson as well.  Recently, I've been logging into the machine using terminal services and then selecting Start --> Restart and entering in a reason and clicking OK.  Takes about 2-3 minutes depending on fast the machine decides to respond.

There's got to be a better way to do this... and there is.

On WinXP and Windows Server 2003 there's the command line tool shutdown.exe.

From the command line (Start-->Run-->type 'cmd' and hit enter) type:

shutdown -r -m \\YourBuddiesPcName

-r = Shutdown and restart the computer
-m = Remote computer to shutdown/restart/abort

To automate it, stick it into a command file (cmd), create shortcuts on your desktop, use SlickRun, or create a PowerShell alias.


No comments: