I am thinking about using the wired MAC-adr as a unique value in a program. So i need to be sure the MAC-adr is the wired one and NOT the wireless.
$mac = gwmi -computer $compname win32_NetworkAdapterConfiguration | select MACAddress
This is what I started with, but it gives me two addresses.
First one is the one I want: 00:00:11:11:22:22
The last one is the wireless address: 00:1F:3C:8E:61:D8
I can't just sort like: select -first 1. Because I don't know what this will get me on other computers..
And btw, this DOES work on ipV6 as well as ipV4?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…