We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f1e72c commit 95d774fCopy full SHA for 95d774f
1 file changed
Pwsh-Gather.ps1
@@ -5,8 +5,8 @@
5
PowerShell.exe -ExecutionPolicy ByPass -File <ScriptName>.ps1 [-Debug]
6
.NOTES
7
Author(s): Jonathan Conway
8
- Modified: 22/04/2020
9
- Version: 1.0
+ Modified: 23/04/2020
+ Version: 1.1
10
#>
11
12
Param (
@@ -245,7 +245,7 @@ function Get-NetworkInfo {
245
}
246
247
248
- $EthernetConnection = Get-NetAdapter -Physical | Where-Object { $_.Name -like "*Ethernet*" -and $_.Status -eq "Up" }
+ $EthernetConnection = Get-CimInstance -ClassName 'Win32_NetworkAdapter' | Where-Object { $_.Name -like "*Ethernet Connection*" -or $_.Name -like "*Realtek PCIe*" -and $_.NetConnectionStatus -eq '2' }
249
250
if ($null -eq $EthernetConnection) {
251
$IsOnEthernet = $false
0 commit comments