Click here to Skip to main content
Click here to Skip to main content

Tagged as

Restarting a system remotely

, 24 Jan 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

Abhinav S
Software Developer (Senior)
India India
I don't know who I am.
Do you know who I am?

Comments and Discussions

 
GeneralRe: Thanks for the information. I never tried -a. PinmvpAbhinav S24-Jan-11 19:16 
GeneralRe: Just tried it on Vista, you're right, it is optional now (us... PinsubeditorIndivara24-Jan-11 19:03 
GeneralReason for my vote of 4 nice man PinmemberPranay Rana24-Jan-11 20:37 
GeneralRe: Thanks. PinmvpAbhinav S24-Jan-11 20:48 
GeneralIndivara -t sets a timeout and AFAIK, is optional. PinmvpAbhinav S24-Jan-11 17:32 
GeneralRe: Thanks for the information. I never tried -a. PinmvpAbhinav S24-Jan-11 19:15 
GeneralDoesn't it require the -t option as well? like shutdown -s -... PinsubeditorIndivara24-Jan-11 17:08 
GeneralRe: Indivara -t sets a timeout and AFAIK, is optional. PinmvpAbhinav S24-Jan-11 17:32 
GeneralReason for my vote of 4 You haven't mentioned anything about... PinmentorDaveAuld24-Jan-11 5:54 
GeneralRe: Dave - You are right. We must have administrative privileges... PinmvpAbhinav S24-Jan-11 17:35 
GeneralGood tip PinmemberBill960314-Mar-10 13:09 
GeneralRe: Good tip PinmemberAbhinav S14-Mar-10 18:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.141022.2 | Last Updated 24 Jan 2011
Article Copyright 2010 by Abhinav S
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid