Network Adapter Information (GUID, MAC, IP, Interface Index, Name, Description)

Recently we needed to find a network adapter, provided with nothing but the GUID. Using the code below, we were able to pull the details for our network cards, and find the one in question. Then we went a bit further to poll more information.

1
2
3
4
5
6
$WMIinfo = Get-WmiObject win32_networkadapter -Property guid, Name, MACAddress
$NICinfo = Get-NetAdapter | Where-Object {$_.MacAddress -eq $WMIinfo.MACAddress -replace ':','-' } | Select-Object ifIndex, Status, LinkSpeed, Name
$IPinfo = Get-NetIPAddress | Where-Object {$_.InterfaceIndex -eq $NICinfo.ifIndex}
$WMIinfo | Select-Object MACAddress, GUID, Name | Out-String
$NICinfo | Out-String
$IPinfo | Select-Object IPAddress | Out-String

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.