Looks like
Get-NetworkAdapter -VM $vm.Name
isn't returning anything.
Is there a NIC on the VM ? Try doing the Get-NetworkAdapter alone.
Looks like
Get-NetworkAdapter -VM $vm.Name
isn't returning anything.
Is there a NIC on the VM ? Try doing the Get-NetworkAdapter alone.