MTSkull Posted March 24, 2008 Posted March 24, 2008 Is it possible to set up a (C# or VB) program to remotely reboot another machine (say a server). The Sys Admin asked about it and I have no clue where to even start looking for something like that. Thanks MTS Quote "Beer is proof that God loves us and wants us to be happy." -Benjamin Franklin
Administrators PlausiblyDamp Posted March 24, 2008 Administrators Posted March 24, 2008 Programatically either InitiateSystemShutdown or InitiateSystemShutdownEx are the API calls you will need. For this to work you would need the requisite permissions to shut down the target machine. Alternatively windows has a shutdown.exe command you could use via the Process class. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
mskeel Posted March 25, 2008 Posted March 25, 2008 Couldn't you just remote into the machine via Remote Desktop and tell the machine to reboot? Of course, that wouldn't be a fully automated solution. Quote
Administrators PlausiblyDamp Posted March 25, 2008 Administrators Posted March 25, 2008 You would need to use shutdown.exe even then, remote desktop disables the shutdown / restart options... Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
mskeel Posted April 7, 2008 Posted April 7, 2008 remote desktop disables the shutdown / restart options... That's interesting, because my server definitely restarts when I tell it to over remote desktop. Perhaps because I'm logged in as an admin? Or perhaps it's a feature exclusive to Windows Server? Quote
SonicBoomAu Posted April 14, 2008 Posted April 14, 2008 I believe that the server disables the shutdown/reset option from the login box. But, that being said, when you have logged into the server you then have the ability (with the appropriate permissions) to shutdown or restart the server. HTH. Quote Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.