Community discussions

MikroTik App
 
keith
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Thu May 24, 2007 12:30 am

Get MAC Address

Fri Jul 20, 2007 2:44 am

I got the following vb script to get the MAC address of a remote system. I would lke the adderss to appear in the label of the device but don't know how to accomplish that. Does anyone have any suggestions. Here is the script

Dim strComputer

strComputer = Wscript.Arguments.item(0)

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")

For Each objItem in colItems
'wscript.stdout.writeline objitem.MACAddress
Wscript.Echo objItem.MACAddress
Next

Who is online

Users browsing this forum: giovanni and 0 guests