How to? Obtain the MAC address for the Ethernet connection

(imported topic written by SystemAdmin)

I know that the MAC address property in TEM will return the MAC of the currently active network adapter. However I need to report the Ethernet MAC address of laptops, even if they are connected via wireless and the Ethernet adapter is not active.

Any ideas?

(imported comment written by SystemAdmin)

Ok, thanks to another post by Ben, I have this below. However I need to filter the return to only show Local Area Connection:

q: (name of item 0 of it & " - " & (address of item 1 of it as string)) of (connections of it, adapters of it) whose (guid of item 0 of it = name of item 1 of it) of network

A: Bluetooth Network Connection - 0.0.0.0

A: Network Connect Adapter - 0.0.0.0

A: Local Area Connection - 0.0.0.0

A: Wireless Network Connection - 192.168.0.102

(imported comment written by SystemAdmin)

something like:

names of connections whose (name of it as lowercase contains “local area connection”) of network

?

(imported comment written by SystemAdmin)

thanks jgstew

Yeah, that is a great start, but I need the MAC address of the LAC.

(imported comment written by SystemAdmin)

Sorry, I did not read your first post. I’ll take another look.

(imported comment written by SystemAdmin)

mac address of adapters whose (friendly name of it as lowercase contains “local area connection”) of network

(imported comment written by SystemAdmin)

mac address of adapters whose (link speed of it = 1000000000 OR link speed of it = 100000000) of network

Assuming the “link speed” inspector reports the maximum link speed, and not the current link speed (like 0 if disconnected), then this should work to filter out everything except for Ethernet adapters even if they are not named “Local Area Connection”. I did test this by disconnecting my network card in my laptop and it still reported the proper adapter.

(imported comment written by SystemAdmin)

Bingo! That worked. Thanks for your help!

anyone know of a way to get this mac address without the “-” ?

concatenation of substrings separated by “-” of …

On a phone at the moment, you’ll hav to fill in tbe rest from the rather aged posts above

3 Likes

you are a life saver!!! got it working :slight_smile:

1 Like