Shutting down remote Windows PC
Hi,
Thought this might be useful. Here's my script to shutdown a remote Windows based PC.
Firstly you'll need to install a small app call Airytech SwitchOff on the remote machine.
You can get that here: http://www.airytec.com/en/switch-off/ Turn on the remote access feature in that app.
This opens http on port 8000
here's my script for the plugboard:
-- Script to shutdown remote windows PC
-- requires Airytech SwitchOff to be running on remote system
-- http://www.airytec.com/en/switch-off/
-- Registers ShutdownPC service
function init()
register_target("dbzoo.livebox.ShutdownPC", "shutdown")
end
-- Sends http request to remote PC
function shutdown()
os.execute("curl http://remoteip:8000/?action=System.Shutdown")
end
Here's my header for GoogleCal:
xap-header
{
target=dbzoo.livebox.ShutdownPC
class=unkown
source=Google
}
Nice thing about this is that it shutdowns all the open apps 'nicely' and then shutdowns the PC.
You can of course just use the app itself to schedule a shutdown....but that's not the point!
Now to figure out how to turn it back on again...myabe I'll just have to use the 'On' button!
Have you tried the Wake On Lan feature, you might need to enable it in your BIOS, but most motherboards these days are able to bring a PC alive with an appropriate WOL command, which the HAH can send ;)