Monday, January 29, 2007

How To Restart A Remote Computer

Sometimes you have to login to your work PC from home over the VPN and after a while for some reason or another you want to restart your PC. How can you do that? You can't use the start menu because only the log off button is displayed
Well one way is to open a command window and executing shutdown -r
That will restart your computer

Here is the basic usage of the shutdown command

Usage: shutdown [-i -l -s -r -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]

No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without warning
-d [u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)

4 comments:

Anonymous said...

or you could just use the task manager....

John S. said...

Start | Windows Security | Shutdown...

Anonymous said...

Good tip. I've used this ever sense they added it to XP. Can't recall if it is on win advanced server 2000 but there is also a nice way to get it done.

Open Computer Management console
Right click computer management
Select connect to another computer
enter the name and ... OK
Right click Computer Management again and select properties
Go to the Advanced tab
Click settings in the startup and recovery
Click the shutdown button
The rest speaks for itself.

I'm not 100% but I believe it sends the same command you posted but if you are having a problem sending remote commands this is a GUI way to execute it

Anonymous said...

Exits other tools for easy make remote computer shutdown, restart, logoff, and more. Here is one of the most easy to use and free for shutdown functions software.

http://enc.idraconnectivesolutions.com/

You can find this software tool in enc.idraconnectivesolutions.com web page