Currently the use of this command:
get-vm | get-networkadapter | ForEach-Object {Write-Host $_.Name","$_.macaddress }
Gives me this output:
Network adapter 1 , 00:50:56:bc:00:1c
Network adapter 1 , 00:50:56:bc:00:28
I am interested in also writing out the actual virtual machine name as well.
virtual machine name 1 , Network adapter 1 , 00:50:56:bc:00:1c
virtual machine name 1 , Network adapter 1 , 00:50:56:bc:00:28
Not sure how to work the virtual machine name output as "Name" is also calling information from the network adapter.