Wake all sleeping machines on subnet

remote-accesswake-on-lanwindows 7

Our company just migrated to Windows 7 and decided to use the included "balanced" power plan. The main problem with this is that I use powershell to do remote management and sleeping machines don't respond to these commands. Does anyone have a suggestion on how I can send out a signal to wake up only sleeping machines?

Now, I already know that I can use the "Magic Packet" with wake on LAN, but that has a few problems.

  1. It would wake up every machine on my network up, both S3 and S5.
  2. I have to know what the MAC address of the machine is in order to wake it up.
  3. Not all machines have WoL enabled.

I only want to wake up those systems in the S3 power state, not the S5 power state. (explanation of power states)

Any thoughts? Thanks in advance

Best Answer

So from everything I have gathered, there is not a way to do this. From what I can tell, the magic packet doesn't differentiate between sleep and powered down.

That doesn't mean remote support is impossible. You just have to attack the problem in another direction. The core tool that you have to overcome this limitation is scheduled tasks. When you create a task, there is an option under "conditions" called "Wake the computer to run this task". This will allow you to run a task when the system is in sleep mode. If the computer is off, it will skip over the command and stay off.

Once you have your tasks setup, just setup an automatic statup time that happens before all of your tasks and you will be able to again manage your systems.

I use "schtasks.exe" to add tasks remotely. It allows you to specify a username and password to use for the tasks and you can overwrite them as needed.

It's a complex system to setup, but can save alot of time and power if you have windows 7 machines across the board.