Bginfo and virtual computing

Bryan Bentz 1 Reputation point
2022-01-16T17:45:38.8+00:00

I'm having lots of network adapters show up, and "(null)"s in the related IP address, subnet mask, DHCP Server, etc. fields. I've already done the 'custom variable' thing with the test for IPEnabled=True, but these adapters may be 'real' in some sense, so that doesn't help.

Five of the entries are Hyper-V Virtual Ethernet Adapters, though Hyper-V is deselected as a Windows feature - I'm sure I tested in the past, for some reason these things are hanging about. Not sure if other Windows programs need them for something, or how to remove them. Two are VMWare, I do have VMWare "Player", not sure I need it. The total of "Network Cards" listed is 9, when only 1 is the physical one that I really care about - it's the second entry in these lists (I believe the variables in the SQL query, e.g.,
SELECT DHCPServer FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=TRUE return arrays). I have no idea if being the second entry is stable across reboots, could easily test that.

Possible solutions: just try to pick the 2nd entry from each, maybe a SELECT TOP 2.... approach; get rid of the Hyper-V adapters, if that's safe; or filter each of the arrays coming back with a function to toss out the entries I don't want. That last is hard, because while I might toss anything starting with "Hyper-V" and "(null)", the MAC addresses, IP addresses, etc. would all still show up. (The larger problem being that key BGInfo lines are pushed off of the bottom of the screen). Or perhaps there is some way to test for a physical/virtual adapter distinction in the SQL, but I kind of doubt that.

I imagine I'm not the first person with this problem, so would appreciate any advice.

Sysinternals
Sysinternals
Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
1,086 questions
0 comments No comments
{count} votes