Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Friend Function GetMACAddress() As String Dim mc As ManagementClass = New ManagementClass("Win32_NetworkAdapterConfiguration") Dim moc As ManagementObjectCollection = mc.GetInstances() Dim MACAddress As String = String.Empty For Each mo As ManagementObject In moc If (MACAddress.Equals(String.Empty)) Then If CBool(mo("IPEnabled")) Then MACAddress = mo("MacAddress").ToString() mo.Dispose() End If MACAddress = MACAddress.Replace(":", String.Empty) Next Return MACAddress End Function
Function getMacAddress() Dim nics() As NetworkInterface = _ NetworkInterface.GetAllNetworkInterfaces Return nics(0).GetPhysicalAddress.ToString End Function
Join the community of 500,000 technology professionals and ask your questions.