aschmied
aschmied

Reputation: 986

Programmatically determine whether a network card is integrated or discrete on Windows

I know I can use GetAdaptersAddresses to retrieve information for the network interfaces on a machine. Additionally, I would like to determine which of those interfaces refer to network cards integrated on the motherboard. The requirement is similar to that discussed here: https://stackoverflow.com/a/3530362/2833126/. The accepted answer there is to check whether the card is a PCI device. I don't think this will work because I believe integrated cards are reported as PCI devices (I can't actually test this right now as I don't have access to a Windows machine right now... at least they show up in the lspci output on Linux).

The use case for this is similar to that mentioned in the SO post linked above: to generate a unique system ID based on the MAC address. I would like to use the MAC address of an integrated card since it is attached to the motherboard and for my problem I would like the system ID to correspond to the motherboard.

Upvotes: 0

Views: 1149

Answers (1)

Loïc MICHEL
Loïc MICHEL

Reputation: 26160

check Win32_OnBoardDevice class
in powershell you can do:

PS C:\temp> gwmi Win32_OnBoardDevice|?{$_.devicetype -eq 5} |select -expand description
Broadcom 5754 NetXtreme Gigabit Controller

Upvotes: 1

Related Questions