Archive for category (WoL)

Enable Wake-On-LAN via CLI

The following will allow you to enable Wake-On-LAN for your network card interface. I’ve only test this on a Windows 7 system, and it’s been working properly in my environment.

By default, my systems have the following configuration:

After running the script, this is how it should look like:

Here’s the code, just copy the code and save with either a .BAT or .CMD extension.

REM ********************************
REM ***** DESCRIPTION **************
REM ********************************
REM ***** Identify network card and write its name
REM ***** to file C:\Users\Default\AppData\Local\Temp\adapters.txt
REM ***** Name of network card is based on the following
REM ***** keywords: gigabit network connection ethernet
REM ********************************
REM ********************************
REM ***** -devicequery Return a list of devices that meet the specified criteria
REM ***** wake_from_any Return all devices that support waking the system from any sleep state.
REM ********************************
REM ***** /I (or /i) Specifies that the search is not to be case-sensitive
REM ********************************
REM ***** Note: this is one long command line (word wrapping may show it as two lines)
POWERCFG -devicequery wake_from_any | FINDSTR /i "gigabit network connection ethernet" > C:\Users\Default\AppData\Local\Temp\adapters.txt

REM ********************************
REM ***** DESCRIPTION **************
REM ********************************
REM ***** Enable WoL on device with the following
rem ***** keywords in its name: gigabit network connection ethernet
REM ********************************
REM ********************************
REM ***** -deviceenablewake Enable the device to wake the system from a sleep state
REM ********************************
FOR /F "tokens=*" %%i IN (C:\Users\Default\AppData\Local\Temp\adapters.txt) DO POWERCFG -deviceenablewake "%%i"

Leave a comment

Wake-on-Lan (WoL) with DELL Optiplex

We wanted to get Wake-on-Lan (WoL) to work on our DELL Optiplex 990 desktops with Windows 7.

Here’s how we got this work in our environment. (Make sure your DELL computers are running the latest BIOS version.)

Enable BIOS settings:
  1. Under Power Management
    1. Enable – Wake on Lan ( LAN Only )
      1. This one is needed for Windows 7 and to allow the machine to be woken up from a sleep state
    2. Disable – Deep Sleep Control
      1. This one is needed to allow to boot up the machine when the machine has been shutdown

Enable Windows 7 settings:
  1. Go to Window’s Device Manager
  2. Go to the properties for your primary network card
  3. Go to the Power Management tab
  4. Click to enable Allow this device to wake the computer
Note: Make sure you create an incoming rule in Windows 7 firewall to allow some of the WoL testing tools to run properly.

Network settings:

  1. If you’re working on a large network, then make sure your network team adds ip directed-broadcast on the router/switch interface where you’ll be sending WoL packets.
We now have all the settings necessary to get WoL working.

To test these settings, you can use the following tools:

Wake-on-LAN monitor/sniffer – great tool! (See Windows 7 settings note)

Wake-on-LAN magic packet sender tool