Sunday, April 13, 2008

How to Do A Remote Shutdown For A PC On A LAN

How to Do a Remote Shutdown for a PC on a LAN

Do you need to shutdown a server or other remote computer? Need to do this from the convenience of your own PC? Here's how to shutdown a remote Windows computer from your own desktop.


Steps
Open the command prompt. This may be done by clicking on the "Start" button, and selecting "Run".
Type in cmd and press Enter.
Type in shutdown -m \\computername, replacing "computername" with the name of the computer you wish to shutdown or the computers ip address.
Experiment with the shutdown command's switches.

-r will force a restart, disabling any services or user interaction from interrupting it.
-c "comment" will force a comment to appear on the system being shutdown.
-t xx will force a timeout for "xx" seconds. For example, -t 60 would perform a shutdown after a 60 second timeout.
-a will abort the shutdown
A full command example: shutdown -m \\myserver -r -c "This system will shutdown in 60 seconds" -t 60


Tips
For a complete list of the switches (options) for the "shutdown" command, type in shutdown ? inside of a command prompt window.
The target computer and your PC need to be in the same Domain or Workgroup for this to function correctly.
This will only work on Microsoft Windows based systems. Linux and Mac will require different terminal commands.
You may also run this shutdown command directly from the "Run" dialog. Opening a command prompt is merely a convenience in case you happen to type in the wrong system name or need to search for the name of the system to shutdown.


Warnings
Perform this only on your own network or where you are authorized to do this.
IT departments typically block access to using this command on a remote computer. Even if they do not hinder your ability to do this, performing this may be grounds for disciplinary action, a write-up at work, or worse, depending upon your IT department's policies.

No comments: