-->![Lan Lan](https://admininfo.info/img/tutoriales/7535/c-mo-habilitar-wake-lan-en-windows-10.jpg)
Surface devices that run Windows 10, version 1607 (also known as Windows 10 Anniversary Update) or later and use a Surface Ethernet adapter to connect to a wired network, are capable of Wake On LAN (WOL) from Connected Standby. With WOL, you can remotely wake up devices to perform management or maintenance tasks or enable management solutions (such as Microsoft Endpoint Configuration Manager) automatically. For example, you can deploy applications to Surface devices left docked with a Surface Dock or Surface Pro 3 Docking Station by using Microsoft Endpoint Configuration Manager during a window in the middle of the night, when the office is empty.
If the machine is powered off the driver settings are meaningless. The only thing that setting allows you to do is wake from a sleep state. If you want to be able to wake from full power off and sleep state you need to set wake on LAN in both the BIOS and in the driver settings. – HackSlash Sep 25 at 21:15. Wake-on-LAN (WoL) is an Ethernet or token ring computer networking standard that allows a computer to be turned on or awakened by a network message. The message is usually sent to the target computer by a program executed on a device connected to the same local area network, such as a smartphone.It is also possible to initiate the message from another network by using subnet directed. In order to use the Wake on LAN feature, you need to set some settings within the systems BIOS. To do so, please follow these steps: Restart the System and press the F2 key multiple times. In the system, BIOS navigate to Power Management and Wake on LAN/WLAN. Activate the Option you wish to use.
Note
Surface devices must be connected to AC power and in Connected Standby (Sleep) to support WOL. WOL is not possible from devices that are in hibernation or powered off.
Supported devices
The following devices are supported for WOL:
- Surface Ethernet adapter
- Surface USB-C to Ethernet and USB Adapter
- Surface Dock
- Surface Docking Station for Surface Pro 3
- Surface 3
- Surface Pro 3
- Surface Pro 4
- Surface Pro (5th Gen)
- Surface Pro (5th Gen) with LTE Advanced
- Surface Book
- Surface Laptop (1st Gen)
- Surface Pro 6
- Surface Book 2
- Surface Laptop 2
- Surface Go
- Surface Go with LTE Advanced
- Surface Studio 2 (see Surface Studio 2 instructions below)
- Surface Pro 7
- Surface Laptop 3
- Surface Laptop Go
WOL driver
To enable WOL support on Surface devices, a specific driver for the Surface Ethernet adapter is required. This driver is not included in the standard driver and firmware pack for Surface devices – you must download and install it separately. You can download the Surface WOL driver (SurfaceWOL.msi) from the Surface Tools for IT page in the Microsoft Download Center.
You can run this Microsoft Windows Installer (.msi) file on a Surface device to install the Surface WOL driver, or you can distribute it to Surface devices with an application deployment solution, such as Microsoft Endpoint Configuration Manager. To include the Surface WOL driver during deployment, you can install the .msi file as an application during the deployment process. You can also extract the Surface WOL driver files to include them in the deployment process. For example, you can include them in your Microsoft Deployment Toolkit (MDT) deployment share. You can read more about Surface deployment with MDT in Deploy Windows 10 to Surface devices with Microsoft Deployment Toolkit.
Note
During the installation of SurfaceWOL.msi, the following registry key is set to a value of 1, which allows easy identification of systems where the WOL driver has been installed. If you chose to extract and install these drivers separately during deployment, this registry key will not be configured and must be configured manually or with a script.
HKLMSYSTEMCurrentControlSetControlPower AllowSystemRequiredPowerRequests
To extract the contents of SurfaceWOL.msi, use the MSIExec administrative installation option (/a), as shown in the following example, to extract the contents to the C:WOL folder:
msiexec /a surfacewol.msi targetdir=C:WOL /qn
Surface Studio 2 instructions
To enable WOL on Surface Studio 2, you must use the following procedure
- Create the following registry keys:
- Run the following command
powercfg /SETACVALUEINDEX SCHEME_BALANCED SUB_NONE CONNECTIVITYINSTANDBY 1
Using Surface WOL
The Surface WOL driver conforms to the WOL standard, whereby the device is woken by a special network communication known as a magic packet. The magic packet consists of 6 bytes of 255 (or FF in hexadecimal) followed by 16 repetitions of the target computer’s MAC address. You can read more about the magic packet and the WOL standard on Wikipedia.
Note
To send a magic packet and wake up a device by using WOL, you must know the MAC address of the target device and Ethernet adapter. Because the magic packet does not use the IP network protocol, it is not possible to use the IP address or DNS name of the device. Screenflow 9 0 20.
How To Setup Wake On Lan
Many management solutions, such as Configuration Manager, provide built-in support for WOL. There are also many solutions, including Microsoft Store apps, PowerShell modules, third-party applications, and third-party management solutions that allow you to send a magic packet to wake up a device. For example, you can use the Wake On LAN PowerShell module from the TechNet Script Center.
Note
After a device has been woken up with a magic packet, the device will return to sleep if an application is not actively preventing sleep on the system or if the AllowSystemRequiredPowerRequests registry key is not configured to 1, which allows applications to prevent sleep. See the WOL driver section of this article for more information about this registry key.
Some of my friends (Hi Joe! Hi Tyler!) recently requested a script to both monitor and enable WOL for workstations at their clients. WOL stands for Wake-On-Lan and is used to boot machines without user intervention. There are two forms of WOL: OS based, to let a machine start up from standby or hibernation, and BIOS based to boot computers which are completely turned off.
![Lan Lan](https://admininfo.info/img/tutoriales/7535/c-mo-habilitar-wake-lan-en-windows-10.jpg)
With the current stress of everyone wanting to work from home via all sorts of tools, my friends found some devices that aren’t replying to WOL packets or machines that simply were not configured for WOL yet.
I figured this could be a pretty cool exercise, I’ve seen a bunch of people making very device specific scripts to enable WOL, but not a lot of manufacture specific scripts that would enable it for an entire line of devices. During my discoveries I’ve found that the three biggest manufactures all have a method to enable WOL directly with PowerShell. Two of them use a module, the other uses a WMI class.
The script will work for Dell, HP, and Lenovo. Disclaimer: I tested the script on a handful of devices, so no guarantees of course. ?
The monitoring script
The monitoring script only works with PowerShell 5.0 or higher. It will also update PowerShell Get and also download the correct module for the device. We match based on the device manufacture in WMI.
After running the script we can check the contents of $WOLState for the current state of the WOL setting in the BIOS. You can also check $NICWOL for the Operating System’s WOL state.
Wake On Lan Bios Setting
The remediation script
So on the remediation side we tackle enabling WOL in both the BIOS and inside of the Operating System. We always install the module in this case, as often module updates are released when newer systems are too.
Like I said in the start – This still is slightly experimental for me. I did not have a large stack of devices to test on other than Dell devices, so if you find any issues with Lenovo or HP devices, let me know and send me a transcript, maybe I can help you figure it out!
And that’s it. As always, Happy PowerShelling.
Lenovo Bios Wake On Lan
update: N-Central remediation AMP can be found here. The monitoring AMP can be found here.
Update 2: Sixtyfour 1 7 2 – boost your old macs performance. Fixed a small encoding issue that crashed the script in some cases.
Update 3: Added better detection logic for nuget which causes a script hang, fixed an import and install module issue. This has not been updated inside of the monitoring AMPs. Please copy and paste the latest script in there. ?