Ecco come fare:
Get-WmiObject Win32_NetworkAdapterConfiguration | where {$_.defaultIPgateway -ne $null}
Avrete
DHCPEnabled : True IPAddress : {192.168.190.72, fe80::599d:fb50:89f3:5c56} DefaultIPGateway : {192.168.190.1} DNSDomain : acme.local ServiceName : RTL8167 Description : Scheda NIC Gigabit Ethernet PCI-E Realtek RTL8168C(P)/8111C(P) (NDIS 6.20) Index : 7
.