Are you sure that portgroup exists?
Yes, the portgroup exists.
I created two vms, one will OS 2008 and other with 2016 on the same host.
This command works for 2008 OS tagged vm but not on 2016 OS.
Infact, if I change the OS version to 2008 in edit settings ( from 2016), this command works fine.
Is this perhaps a portgroup on a VSS?
In that case it needs to be defined on the ESXi node where the VM is registered to.
You can check with (update the name of the VM and the portgroup accordingly)
Get-VM -Name vm1 | Get-VMHost | Get-VirtualPortGroup -Name xxxxvlan105