diff --git a/playbook/migrate-to-wifi.ps1 b/playbook/migrate-to-wifi.ps1 index 4792554..be803f0 100644 --- a/playbook/migrate-to-wifi.ps1 +++ b/playbook/migrate-to-wifi.ps1 @@ -9,7 +9,7 @@ # internet that could never arrive on towers, hanging first logon forever. $wifi = Get-NetAdapter -Physical -ErrorAction SilentlyContinue | - Where-Object { $_.InterfaceDescription -match 'Wi-Fi|Wireless' } + Where-Object { $_.InterfaceDescription -match 'Wi-?Fi|Wireless|WLAN|802\.11' } if (-not $wifi) { Write-Host 'No WiFi adapter - staying on ethernet.' -ForegroundColor Cyan @@ -17,7 +17,7 @@ if (-not $wifi) { } Get-NetAdapter -Physical | - Where-Object { $_.InterfaceDescription -notmatch 'Wi-Fi|Wireless' } | + Where-Object { $_.InterfaceDescription -notmatch 'Wi-?Fi|Wireless|WLAN|802\.11' } | Disable-NetAdapter -Confirm:$false $deadline = (Get-Date).AddMinutes(5) @@ -37,7 +37,7 @@ if ($ok) { } else { Write-Host 'WiFi internet timeout - re-enabling ethernet.' -ForegroundColor Yellow Get-NetAdapter -Physical | - Where-Object { $_.InterfaceDescription -notmatch 'Wi-Fi|Wireless' } | + Where-Object { $_.InterfaceDescription -notmatch 'Wi-?Fi|Wireless|WLAN|802\.11' } | Enable-NetAdapter -Confirm:$false } exit 0 diff --git a/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 b/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 index f32d1a9..b51a408 100644 --- a/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 +++ b/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 @@ -105,7 +105,7 @@ Write-Host "" # ============================================================================ try { Get-NetAdapter -Physical -ErrorAction SilentlyContinue | - Where-Object { $_.InterfaceDescription -notmatch 'Wi-Fi|Wireless' } | + Where-Object { $_.InterfaceDescription -notmatch 'Wi-?Fi|Wireless|WLAN|802\.11' } | Enable-NetAdapter -Confirm:$false -ErrorAction SilentlyContinue Write-Host "Wired NICs re-enabled (was migrate-to-wifi.ps1 had disabled them on laptops)." } catch {