ManagementClass mcMAC = new ManagementClass( " Win32_NetworkAdapterConfiguration " );ManagementObjectCollection mocMAC = mcMAC.GetInstances(); foreach (ManagementObject m in mocMAC) ... { if((bool)m["IPEnabled"]) ...{ return m["MacAddress"].ToString(); }}