It's a combination on two WMI calls (I'm sure one can merge them into one):
PS > gwmi Win32_NetworkAdapter -filter "netconnectionid is not null"| select
netconnectionid,interfaceindex | ft -auto
Local Area Connection 10
Bluetooth Network Connection 13
Wireless Network Connection 14
Local Area Connection 19
Now you can issue a second WMI call to the interface you need:
PS > gwmi Win32_NetworkAdapterConfiguration -filter "interfaceindex=10"
DHCPEnabled : True
ServiceName : e1express
Description : Intel(R) 82566MM Gigabit Network Connection
Index : 4
Windows PowerShell MVP http://blogs.microsoft.co.il/blogs/ScriptFanatic
p> I'm trying to find a way to list the network adapter information
p> based on the ethernet adapter as listed by ipconfig - the 'defaults'
p> are 'Local Area Connection', Local Area Connection 2', etc...
p> I've found lots of info using Win32_NetworkAdapterConfiguration, and
p> this gets me most of what I want. But I can't find the 'name' in
p> this object. How do I get this name? Or is there a way I can get
p> the NICs Win32_NetworkAdapterConfiguration object with the given
p> name. Either will work with with I'm doing.