-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathWakeOnLAN.ps1
More file actions
39 lines (36 loc) · 1.11 KB
/
WakeOnLAN.ps1
File metadata and controls
39 lines (36 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<#
.SYNOPSIS
Set Wake-On-LAN
.DESCRIPTION
Set the Wake-on-LAN BIOS Setting
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2022 v5.8.207
Created on: 6/29/2022 8:26 AM
Created by: Mick Pletcher
Filename: WakeOnLAN.ps1
===========================================================================
#>
#Install Dell BIOS Provider PowerShell Module
Try {
Import-Module -Name DellBIOSProvider
}
Catch {
Find-Module -Name DellBIOSProvider | Install-Module -Force
Import-Module -Name DellBIOSProvider
}
#Wake on LAN/WLAN
#Set-Item -Path DellSMBIOS:\PowerManagement\WakeOnLan LanWlan
Write-Host "Wake-On-LAN....." -NoNewline
If ((Get-Item -Path DellSmbios:\PowerManagement\WakeOnLan).CurrentValue -ne 'LanOnly')
{
Set-Item -Path DellSMBIOS:\PowerManagement\WakeOnLan -Value 'LanOnly'
}
If ((Get-Item -Path DellSmbios:\PowerManagement\WakeOnLan).CurrentValue -eq 'LanOnly')
{
Write-Host "Enabled" -ForegroundColor Yellow
}
else
{
Write-Host "Disabled" -ForegroundColor Red
}