We need to move a VM from a PortGroup on a vDS to a PortGroup on a vSS. It is an appliance, so we can't choose a vSS, in the GUI.
When we run this script, we get the error below.
$VM0 = Get-VM -Name vmname
$ostdportgrouptouse = Get-VirtualPortGroup -VMHost $VM0.vmhost -Standard -name "vmotion-01"
Get-NetworkAdapter -VM $VM0 -Name "Network adapter 2" |
Set-NetworkAdapter -Portgroup $ostdportgrouptouse
Get-NetworkAdapter -VM $VM0
Has anyone seen this error before?
I have used this thread for reference: Set-NetworkAdapter to standard switch from DVS