Hello,
I write a script to move vm to ressource pool. But for each vm a vmotion is launched with the move to resource pool.
is there a way to move vm to ressource pool and let the VM on the host where it was running like the Drag&Drop with the GUI?
Here come the script ( i use -location to specify the Esxi where the vm is running but it don't do the trick).
$vms = get-content test.txt
$pool= Get-ResourcePool TestPool
foreach ($vm in $vms){
$vmloc = Get-VM $vm
Get-VM $vm -Location $vmloc.vmhost | Move-VM -Destination $pool
}