Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / general

Restarting a system remotely

4.21/5 (12 votes)
24 Jan 2011CPOL1 min read 1  
Restarting a system remotely
I was using terminal services to connect to a machine remotely and for some strange reason, after a few minutes I got disconnected and was unable to connect to it (using the Microsoft Terminal Console). I could, however, ping it - and that made me feel quite irritated - I was stuck.

I knew restarting the remote system would fix this problem - but how?

So first, I went on to the internet and rummaged about a bit. Then, I went into the command prompt by typing in cmd (within the run command option in Windows) and typed in - shutdown -r -m \\xxx.xx.xx.xxx (xxx.xx.xx.xxx being my IP). I got a message that said something like "restart with force option". So I changed my restart command to shutdown -r -f -m \\xxx.xx.xx.xxx and lo, things worked. Within a few minutes my remote machine had restarted and I could remotely connect to it.

For other shutdown command options, type shutdown /? from within the command prompt and it should throw up a list of options.

I thought I would post this as a quick trick - it might help someone in a similar position sometime.

Cheers...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)