Getting Network Adapter information using PowerCLI

So recently I was asked for a list of MAC addresses for all the VMs in my demo environment… Didn’t really want to do this manually by going into each VM and checking the hardware settings, so thought I’d see if I can find some PowerCLI commands that will do the job…… After a short dive into the PowerCLI reference guide I found the following commands worked:

Get-VM |
Get-NetworkAdapter |
Select-Object -property Parent, MacAddress
Format-List -Property *


Note: I’m assuming you know how to use the vSphere PowerCLI Interface….. if not, you’ll need to connect to the vCenter Server in PowerCLI before running the cmdlets above!

If you don’t use the Select-Object command, it will list every property field for each of the network adapters, as I only wanted the VM name and MAC address, those were the properties that I chose.

You can even output the info to a txt file by adding the > c:\xxx.txt after the Select-Object command line, or even output to a csx file (using | Export-csv c:\xxx.csv)


VMware have just released a new design guide regarding Network Virtualisation. Particularly focusing around VXLAN….

As part of my new job, I’ve taken it upon myself to educate my peers on interesting articles released by VMware.

VXLAN is being mentioned quite a lot these days as VMware and Cisco start banging on about the move to a “Software-defined datacenter”. Up until last December, I was pretty must oblivious to virtual networking and have only recently started reading up on the stuff….. pretty tough going considering my poor understanding of network technologies! (One area I am striving to improve on).

So given what I’ve learnt, I thought it would be useful to briefly explain my understanding on VXLAN! =)

Virtual eXtensible LAN (VXLAN) basically expands on VMware’s network virtualisation by getting rid of the limitations of scale when implementing VLANs (4096), the problems of spanning a network across disparate data centres, and also the lack of multi-tenancy isolation – I believe you can get 16mil networks with VXLAN.

It’s designed to act as an L2 virtual network over the L3 physical network – in other words the L2 packet from the VM (MAC) is wrapped in a L3 IP header by the vSwitch and sent out over UDP. One of the advantages of this MAC-in-IP encapsulation is the ability to span a network domain across 2 different data centres – i guess similar to a stretched VLAN.

TBH, I can only envisage VXLAN being implemented in multi-tenancy cloud solutions to allow network scalability. However, it’s worth understanding the basics of VXLAN and what it is as I’ve seen customers catch hold of this “buzzword from VMware/Cisco” and think it’ll be useful to them. If I’m honest, if anyone asks about VXLAN then I would suggest you tell them that unless they’re going to break the limit of VLAN then don’t bother with it until the technology is fully matured – there are niggling issues with switch supportability (if it’s not a new cisco switch), routing issues caused by multiple IP addresses on the same subnet existing in multiple locations at the same time (think multi-tenancy cloud talking out via 1 internet gateway), etc. Probably more headaches than it’s worth…… not to mention a re-think of your network and the cost of implementing it!


Anyways, here are 2 great blogs that have helped me to understand VXLAN:

(You can never go wrong with Duncan Epping and Scott Lowe!)