//试试这个
ManagementObjectSearcher Searcher = new ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration ");
foreach (ManagementObject Share in Searcher.Get())
{
string iPEnabled = Share.GetPropertyValue("IPEnabled").ToString();
if (iPEnabled.ToUpper() == "TRUE")
{
object MACAddress = Share.GetPropertyValue("MACAddress");
}
}