WQL Help - Win32_NetworkAdapterConfiguration
Hi guys/girls,
I can't seem to figure out how to filter out the NICs without default gateway set:
More readable version:
gwmi -Query 'SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE DefaultIPGateway IS NOT NULL'
gwmi -Query 'SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE DefaultIPGateway <> ""'
It seems like the DefaultIPGateway property is always an array. If this is the case how do we say "something equals to an empty array" in WQL??
February 12th, 2015 12:39pm
Get-WmiObject Win32_NetworkAdapterConfiguration -filter 'IPEnabled=True'|where{$_.DefaultIPGateway}
February 12th, 2015 1:16pm
Get-WmiObject Win32_NetworkAdapterConfiguration -filter 'IPEnabled=True'|where{$_.DefaultIPGateway}
February 12th, 2015 2:41pm
You cannot test on arrays and complex objects.; only on strings, booleans and numbers.
February 12th, 2015 3:16pm
You cannot test on arrays and complex objects.; only on strings, booleans and numbers.
February 12th, 2015 3:26pm
Microsoft has always been schizo about WMI documentation.
February 12th, 2015 4:33pm