column 1 "vmname" "macaddress" "switchname" "ipaddresses"
This code reads the running state of all VMs and prints the name, MAC address, and switch name for each VM, as well as the IP addresses assigned to it.
get-vm | ?{$_.State -eq "Running"} | select -ExpandProperty networkadapters | select vmname, macaddress, switchname, ipaddresses | ft -wrap -