How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (2024)

Wake on LAN (WoL) is a computer networking feature used to remotely wake (turn on) a device that is in sleep (low power) mode. The device’s network interface card (NIC) can cause the computer to wake up after receiving a special broadcast packet (magic packet) containing its MAC address. In this article, we will look at how to enable and use Wake on LAN on a Windows device.

First, you need to enable Wake-on-LAN in your computer’s BIOS/UEFI firmware settings. Depending on your computer model and firmware version, the exact name of this option may vary. It can be called:

  • WOL (Wake-on-LAN)
  • Power On By PCI-E
  • Resume by PCI-E Device
  • Resume by PME
  • S4/S5 Wake on LAN
  • ErP

How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (1)

On a brand-name computer, you can view and change BIOS/UEFI settings with PowerShell. For example, on a Lenovo laptop, you can use the following commands to enable the WOL option in BIOS:

$getLenovoBIOS = gwmi -class Lenovo_SetBiosSetting -namespace root\wmi
$getLenovoBIOS.SetBiosSetting("WakeOnLAN,Enable")
$SaveLenovoBIOS = (gwmi -class Lenovo_SaveBiosSettings -namespace root\wmi)
$SaveLenovoBIOS.SaveBiosSettings()

Then enable Wake on LAN (WOL) in the settings for your network adapter in Windows.

  1. Open the Device Manager console (devmgmt.msc);
  2. Open the properties of your physical NIC in the Network Adapters section;
  3. Go to the Advanced tab and make sure the Wake on magic packet option is enabled (the option name may vary depending on the network adapter). On Intel network cards, this option may be called PME (Power Management Event); How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (2) You can use PowerShell to check that the WakeOnLan option is enabled in the settings for your network adapter:
    Get-NetAdapter -Physical | Get-NetAdapterAdvancedProperty | where {($_.DisplayName -like '*WOL*') -or ($_.DisplayName -like '*Wake*')}
    How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (3)
    To enable WOL for a NIC, run (Depends on driver and NIC vendor):
    Get-NetAdapter -Physical | Set-NetAdapterPowerManagement -WakeOnMagicPacket Enabled -WakeOnPattern Enabled
  4. Then go to the Power Management tab and allow the network adapter to wake the computer from sleep mode. Enable the Allow this device to wake the computer and Only allow a magic packet to wake the computer options. How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (4)

    You can enable this option using cmd:
    powercfg /deviceenablewake "Realtek PCIe GbE Family Controller"

Wireless Wi-Fi adapters also have remote wake-up support. This standard is called Wake on Wireless LAN (WoWLAN).

Use the following command to check which devices can wake your computer:

powercfg /devicequery wake_armed

How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (5)

The Realtek PCIe network card can wake the computer from sleep in this case.

For Wake on LAN to work, you don’t need to open any ports in the Windows Defender firewall. The UDP broadcast WOL Magic Packet is received and processed directly by the network card and doesn’t reach the Windows network stack.

You will now be able to send a WoL packet to turn on your computer remotely from another device on the same LAN. Magic Packet contains the hardware address of the network card (MAC address) of the computer you want to turn on. You can find out the MAC address of your NIC from the ipconfig /all command output, or by using PowerShell:

Get-NetAdapter -Physical

How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (6)

Let’s generate and send a WOL magic broadcast packet using a simple PowerShell script. In the following script, specify the MAC address of the device you want to wake up:

$Mac = "08:99:02:b6:25:2a"
$MacByteArray = $Mac -split "[:-]" | ForEach-Object { [Byte] "0x$_"}
[Byte[]] $MagicPacket = (,0xFF * 6) + ($MacByteArray * 16)
$UdpClient = New-Object System.Net.Sockets.UdpClient
$UdpClient.Connect(([System.Net.IPAddress]::Broadcast),7)
$UdpClient.Send($MagicPacket,$MagicPacket.Length)
$UdpClient.Close()

How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (7)

If configured correctly, the remote computer should wake up.

To use WOL in segmented networks or networks divided into VLANs, you must enable the forwarding of WoL broadcast packets (UDP port 9) at the network L3 switch or router level.

To wake up computers remotely, you can use the free Windows tool WakeMeOnLan from NirSoft. This tool allows you to scan your LAN and find all available devices, or you can manually add devices that you want to turn on remotely using WakeOnLan.

How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (8)

WakeMeOnLan supports command line mode. Run the following command to wake up the remote device by its IP address. The tool will automatically resolve the IP address to the MAC according to the arp table:

WakeMeOnLan.exe /wakeup 192.168.13.115

Or enter its MAC address:

WakeMeOnLan.exe /wakeup 04-7C-16-DA-CA-63

You can also use WoL tools on smartphones. For example, Wake On LAN for Android. To start your computer remotely, connect to the same LAN via a Wi-Fi hotspot (access point).

If your computer does not turn on after the Wake on LAN packet is sent, you may need to disable Windows Fast Startup in the power settings. Fast Startup is enabled by default in Windows 10 and 11, and it may prevent the computer from being woken up by WOL (or can be the reason why Windows won’t shut down).

Run powercfg.cpl and navigate Choose what the power buttons do -> Change settings that are currently unavailable -> uncheck the option Turn on fast startup (recommended).

How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (9)

How to Enable and Configure Wake-on-LAN (WoL) in Windows | Windows OS Hub (2024)
Top Articles
Latest Posts
Article information

Author: Lilliana Bartoletti

Last Updated:

Views: 6251

Rating: 4.2 / 5 (73 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Lilliana Bartoletti

Birthday: 1999-11-18

Address: 58866 Tricia Spurs, North Melvinberg, HI 91346-3774

Phone: +50616620367928

Job: Real-Estate Liaison

Hobby: Graffiti, Astronomy, Handball, Magic, Origami, Fashion, Foreign language learning

Introduction: My name is Lilliana Bartoletti, I am a adventurous, pleasant, shiny, beautiful, handsome, zealous, tasty person who loves writing and wants to share my knowledge and understanding with you.