How to fetch the MAC address of the teamed NIC card on Server 2012?

Hi All,

Can some one suggest me programmatically how to fetch the NIC teaming adapter(Mac address of the teamed NIC card) on Server 2012?
It would be helpful if you could provide some sample source code or some weblinks which explains the logic to fetch the MAC address of the teamed NIC card on Server 2012.

Thanks in advance.

Regards,

Vinay


NOTE: We know that we can get the list of adapters using GetAdaptersInfo api. But we  want to list only teamed NIC cards MAC address.
July 4th, 2013 3:26am

Perhaps the MSDN forum would be more responsive. You have landed in general forum and no programming is expected here.

Thank you for understanding

Milos

Free Windows Admin Tool Kit Click here and download it now
July 4th, 2013 3:45pm

PowerShell

$output = Get-NetAdapter <teamednic>

$output.macaddress will contain the MAC address.

And, if you want to get the information without knowing the names of the NIC teams, you can use the Get-NetAdapter to return a list of all adapters and then you select the ones with .InterfaceDescription containing 'Microsoft Network Adapter Multiplexor' and use the .macaddress for each of those.

July 4th, 2013 3:51pm

Thank you.

Can't the Network Interface Description change?

Because as per the below link it is changeable:

http://technet.microsoft.com/en-us/library/cc787332%28v=ws.10%29.aspx

If it gets changed, the above mentioned method might not work.

Regards,

Vinay

Free Windows Admin Tool Kit Click here and download it now
July 5th, 2013 6:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics