Find out the MAC-Adress of a server

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
 
J

John Timney \(MVP\)

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top