At the school I work at I want to make a project where instead of using these really bad old laptops as thin client stations, to use raspberry pi's to connect to a multipoint server 2012 server.
My plans for this Pi is to install IoT on it and possibly code an addon for it.
If you want to install IoT on a raspberry Pi 3 you will need to use https://www.raspberrypi.org/downloads/noobs/ as it is a new version that is not on the IoT Website yet. It's also really nice just to be able to install multiple oss' and easily!
To give some background.... I live in two houses, mothers and fathers, and would like remote access to both machines at any given time, but would rather not leave them powered on 24/7.
I am looking at hooking up something like a relay or opto-isolator unit into the power trigger on the motherboard, to short the pins when triggered by a GPIO output from the Pi. With some backend scripting, I am going to set this up to respond to a http request from my server (or independently send keepalive requests to my server and check if the response from the server contains a request for poweron). So, this will allow me to remotely power on each machine independently without having to be at the machine, and without the machine actually having to be powered up or in a state of sleep, allowing for zero power usage when it's not needed to be on.
When I get paid from work I'll set this up when I get the chance, and probably post on here when it's done
Create a webpage that has a button to run the command. You may want to password protect the webpage and use a different port so its harder to get to. but from there you can use remote desktop to control then shutdown the PC.
While WOL is great, it's proved to be unreliable when I've tried in the past (I might have even used that same script). This also requires me to leave the PC in sleep mode, which is awkward as it sometimes likes to wake its self up (unknown as to why). I also want to be able to power up the machine from a complete power off.
@Will - I've not got a great deal of experience with nodejs, so I might hit you up on that one when I get around to it ...
You shouldn't have to leave it in sleep mode. Just make sure when you turn off the pc you don't unplug it at the wall so that the network adapter stays active and is ready to respond to the magic packets.