Dell - Enable Wake On LAN in BIOS

###
# Author: Dave Long <[email protected]>
# Date: 2020-03-23
# Description: Enabled WakeOnLAN support in Bios on Dell computers
###

if (-not ((Get-WmiObject win32_bios).Manufacturer -like "Dell*")) {
  Write-Error "Command must be run against a Dell computer"
  exit 1
}

if (-not (Get-Module -ListAvailable -Name DellSMBios)) {
  Install-Module -Name DellSMBios -Force
}

Import-Module DellSMBios

if(Test-Path dellsmbios:\PowerManagement\WakeOnLan) {
  Set-Item -Path dellsmbios:\PowerManagement\WakeOnLan LANOnly
} else {
  Write-Error "Computer does not support WakeOnLAN"
}

Script data

Language - PowerShell

Run as - System / Root User

Script timeout duration - 5 Mins