PowerShell scripts I used to manage (specifically to enable) Wake-on-LAN (WoL) functionality using Microsoft Intune Proactive Remediations, now "Remediations". They were particularly when renovating fleet of new devices.
This repository contains the following scripts:
-
Detect_WOL.ps1
: Retrieves the Wake-on-Lan (WOL) settings of a Windows device from the UEFI configuration. It checks the manufacturer of the device and attempts to get the WOL state. The script supports Dell, HP, and Lenovo devices. Attempts to install the required module for the manufacturer if it's not already installed. The function also checks the WOL state at OS level for each network interface card (NIC) and returns the WOL state at BIOS and OS level. It reports back findings and actions to the Intune Console, you do need to remember to enable view of the "output" columns in the Remediations devices report. -
Fix_WOL.ps1
: This script updates the Wake-on-Lan (WOL) settings of a Windows device from the UEFI configuration. It checks the manufacturer of the device and attempts to set the WOL state. The script supports Dell, HP, and Lenovo devices. It attempts to install the required module for the manufacturer if it's not already installed.
To use these scripts, clone the repository to your local machine or download the individual .ps1 files. Run each script in a PowerShell environment with appropriate administrative privileges.
For usage via Microsoft Intune's Remediations feature, follow these steps:
- Clone or download the scripts from this repository.
- In the Microsoft Endpoint Manager admin center, select "Devices" and then "Remediations".
- Click on "+ New remediation" to create a new remediation.
- In the new remediation, provide a name and description, and upload the PowerShell scripts from this repository. The
Detect_WOL.ps1
script will be used for detection, and theFix_WOL.ps1
script will be used for remediation. - Assign the remediation to a group of devices in the "Assignments" section of the remediation.
- Monitor the progress and success of the remediation in the "Overview" section.
The scripts in this repository are based on and inspired by the following resources:
- Kelvin Tegelaar's posts on Reddit and Cyberdrain:
- Additional references:
Contributions to the MEM_EnableWOL repository are welcome. Please ensure that any pull requests for script additions or changes are thoroughly tested in a MEM environment before submission.
This project is licensed under the MIT License.