Find out the MAC-Adress of a server

  • Thread starter Thread starter Halimaji Nijazi
  • Start date Start date
H

Halimaji Nijazi

Hi everybody

My application is running on a share on the server.

On Starting the application I would like to check the mac-adress of the
server, but the only information i have is the share path.

How can I get the mac-adress of the server which is sharing the drive?

Thanks alot

Nijazi Halimaji
 
try this

ManagementClass myManagementClass = new
ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = myManagementClass.GetInstances();
foreach(ManagementObject mo in moc)
{
Console.WriteLine(mo["MacAddress"].ToString());
}

Regards

John Timney (MVP)
 
Back
Top