Поскольку я трачу много времени на поиск пути к VB.NET, поэтому я публикую это для всех, кто может быть полезен.
<DllImport("iphlpapi.dll", SetLastError:=True)> _
Public Shared Function GetAdaptersInfo(ByVal info As Byte(), ByRef size As UInteger) As Integer
End Function
Public Shared Function GetMacAddress() As String
Dim num As UInteger = 0UI
GetAdaptersInfo(Nothing, num)
Dim array As Byte() = New Byte(CInt(num) - 1) {}
Dim adaptersInfo As Integer = GetAdaptersInfo(array, num)
If adaptersInfo = 0 Then
Dim macAddress As String = ""
Dim macLength As Integer = BitConverter.ToInt32(array, 400)
macAddress = BitConverter.ToString(array, 404, macLength)
macAddress = macAddress.Replace("-", ":")
Return macAddress
Else
Return ""
End If