0

I'd like to look for network interfaces that have an IP address set for the default gateway. The following won't work, since DefaultIPGateway seems to be an array, but it shows what I'm trying go get:

Get-WMIObject  -class win32_NetworkAdapterConfiguration -Filter "DefaultIPGateway!=''"

$null also does not work. I'd like to keep this as simple as possible, of course. Ideas, anyone?

1 Answers1

1
Get-WMIObject  -class win32_NetworkAdapterConfiguration | where-object { $_.DefaultIPGateway -ne $null }
Andrey Marchuk
  • 13,301
  • 2
  • 36
  • 52