Hi- I've seen a lot of threads about getting network adapter information but none of them seem to fit my scenario...
I am running a script to capture computer data for an inventory database. Two fields for each record that I need data for are Ethernet MAC and Wireless MAC.
I am currently using this powershell command:
$Networks = Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName $Computer | Where-Object {$_.IPEnabled}
$MACAddress = $Networks.MACAddress
but by what I'm seeing this is grabbing data from the active network adapter, whether it's Ethernet or Wireless. Is this correct?
If so, how do I resolve this issue? I need to run this script on about 1000 PCs. I've seen threads that say to using some identifying characteristic of the adapter, such as AdapterType of Name but when I've tried these I still get back too much or irrelevant
info. And the variations on Name could be in the dozens.
So what I'm trying to accomplish is to grab the mac of the Ethernet adapter and the mac of the wireless adapter, if present.
Thanx
SteveInOregon2017
"Never, never doubt what nobody is sure about." -Willy Wonka