Physical Mac address analysis

hello,

I’m trying to write a physical Mac address analysis, but it’s not easy.
I would like to write an analysis that excludes all virtual MAC and checks the physical MAC address.

I need help

WMI object “Win32_NetworkAdapter” does have a property that refers to Physical Identication; however, I’m not sure if we have a direct relevance inspector for this.

Try this:

Q: (string value of property "PhysicalAdapter" of it, string value of property "MACAddress" of it | "None") of select objects "* from Win32_NetworkAdapter" whose (string value of property "PhysicalAdapter" of it contains "True") of WMI
A: True, 04:CF:4B:18:29:2C
A: True, 04:CF:4B:18:29:28
T: 111.905 ms
I: plural ( string, string )
1 Like

@vk.khurava Thanks for your help vk.khurava,

But I want to make more modifications, but it doesn’t work.
I don’t want the word True to be printed,

2C:F0:5D:54:78:92, 00:FF:77:EF:E8:29 I would like to output it like this, but how is this possible?

Try this -

Q: concatenations ", " of (string value of property "MACAddress" of it | "None") of select objects "* from Win32_NetworkAdapter" whose (string value of property "PhysicalAdapter" of it contains "True") of WMI
A: 04:CF:4B:18:29:2C, 04:CF:4B:18:29:28
T: 114.361 ms
I: plural string

@vk.khurava

Thank you for quick response. :slight_smile:

But it seems that WiFi and other Macs are also available.
And looking at the attached photo, I want to disable None output.

There is too much information in the properties; I can’t look into them all. Try looking into the sub properties and adding logic to remove anything you don’t want or that is contradicting.

Additionally, you can attempt the following to obtain the specifics of every property that is available: select objects "* from Win32_NetworkAdapter" of wmi

This can be done, see below-

Q: concatenations ", " of (string value of property "MACAddress" of it) of select objects "* from Win32_NetworkAdapter" whose (exists string value of property "PhysicalAdapter" of it AND string value of property "PhysicalAdapter" of it contains "True") of WMI
A: 70:70:FC:02:A8:81, 78:8A:86:41:8B:6A, 78:8A:86:41:8B:6B, 00:50:56:C0:00:01, 00:50:56:C0:00:08
T: 161.026 ms