Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

The script will definitely not work when there is more than 1 vNIC.
You could try to extend the following line to only select the vNIC that was connected to the session.
That could for example be based on the vNIC name.

$vmNic = $vm.ExtensionData.Config.Hardware.Device | where{$_.Backing -is [VMware.Vim.VirtualEthernetCardDistributedVirtualPortBackingInfo]} 

 


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference