I\'m using WMI (Win32_NetworkAdapter) and trying to get the details of attached physical network adapters either wired or wireless and avoid virtual adapters, etc.
R
I see this is an old question, but I have found an answer elsewhere on the internet which gives a description of how this can be done (scroll all the way down to the comments).
The comment-er's technique allows the identification of WiFi and Bluetooth interfaces, where all other types may be grouped together. If the goal is only to separate the WiFi from the Ethernet adapters, it should be sufficient.
The queries are (Powershell sample):
$nics = Get-WmiObject -Namespace "root/CIMV2" -Query "SELECT * FROM Win32_NetworkAdapter"
$types = Get-WmiObject -Namespace "root/WMI" -Query "SELECT * FROM MSNdis_PhysicalMediumType"
The first query is the common approach which will provide the list of adapters. As previously noted, it can be filtered to only include valid, physical devices by a number of other selection criteria.
The second query returns a WMI object with a NdisPhysicalMediumType property, which according to the linked site, has the value 9 for WiFi, 10 for Bluetooth, and 0 for Ethernet and most other adapter types.
It looks like joining these two queries has to be done manually in script using the Name or Description property of the first query and the InstanceName property of the second.