I'm working on a solution where machines are activated through Wake On Lan after which System Center pushes updates to the client pc's (running Windows 7).
Now I'm working at a script (PowerShell/C#), that checks if the machine should be shutdown after the updates finishes.
If the machine is activated through Wake On Lan and no user has logged on to the machine since activation, the machine can be safely closed. Otherwise, the machine should stay on.
Is there some way to check how the computer got activated?