Here’s a quick command that uses the WMI class Win32_NetworkAdapter to list all your existing network connections.
Get-WMIObject Win32_NetworkAdapter | Format-List Name, MACAddress, AdapterType | less
It can be shortened using aliases for Get-WMIObject and Format-List
gwmi Win32_NetworkAdapter | fl Name, MACAddress, AdapterType | less
Looks easy now that you’ve seen it, right? If you find that the Win32_NetworkAdapter class can’t do what you need; have a look at the Win32_NetworkAdapterConfiguration class.
Enjoy!
- Edward