I am trying to read the network adapters as seen here at the moment I am using the code I found online
Sub Main()
Dim path As ManagementPath = New ManagementPath()
path.Server = "."
path.NamespacePath = "root\CIMV2"
Dim scope As ManagementScope = New ManagementScope(path)
Dim query As ObjectQuery = New ObjectQuery("SELECT * FROM Win32_NetworkAdapter")
Dim searcher As ManagementObjectSearcher = New ManagementObjectSearcher(scope, query)
Dim queryCollection As ManagementObjectCollection = searcher.Get()
Dim m As ManagementObject
For Each m In queryCollection
Console.WriteLine("Device Name : {0}", m("Name"))
Next
Console.ReadLine()
End Sub
Right now I am seeing a list of devices that include those 4, but also a bunch of hidden devices and what looks like devices that are not connected anymore. How do I refine my search to only show what the device manager shows by default?