Yes, sir. I'm using the same exact values returned form the Get-VDPortgroup command-let. I even renamed the VDS portgroup to match the same name as the VSS portgroup and got the same error. I know this script would work if we are moving from VSS to VSS
Just did some further testing (on vSphere 6.5), and as far as I can tell changing the network connection from a VSS portgroup to a VDS portgroup works without a glitch for me.
I did something like this
Update: note that migrating from VSS to VDS this way is only supported since vSphere 6
$vmName = 'MyVM'
$newEsxName = 'MyEsx2'
$newDsName = 'MyDS2'
$newPgName = 'dvPortGroup'
$vm = Get-VM -Name $vmName
$esx = Get-VMHost -Name $newEsxName
$ds = Get-Datastore -Name $newDsName
$pg = Get-VDPortgroup -Name $newPgName
Move-VM -VM $vm -Destination $esx -Datastore $ds -PortGroup $pg
Your code below worked flawlessly!! My mistake on not mentioning the vSphere platform early on. Yes, we are on vSphere 6.5. Thanks again!!