Powershell: Getting a list of VM adapter types

The following code will list the VMs which have network adapters that are not VMXNET3. This is useful for knowing what you likely have to change 😉

It will output the Name of the VM, the Type of adapter and the Network (i.e. Virtual Machine Portgroup) that it is connected to.

The code will examine all the VMs on the vCenter, but you can pass parameters to the Get-VM cmdlet to reduce the scope (i.e. Get-VM -Location “Discovered Virtual Machines”).

Get-VM | Get-NetworkAdapter | ? { $_.Type -ne "vmxnet3" } | Select @{Name="Name";Expression={$_.Parent.Name}}, Type, NetworkName | ft