How can i programatically determine if a Network Adapter is virtual on Windows?
Unfortunately, I do not know a reliable way to identify virtual network adapters.
At least you can do the same as you did with PS and filter the adapters containing 'Virtual' in the description:Calling GetAdaptersInfo
(https://msdn.microsoft.com/en-us/library/windows/desktop/aa365917(v=vs.85).aspx) you get an array of PIP_ADAPTER_INFO
structs.Their Description
field holds the description you will want to check.