Get-ResourcePool x -Location A | get-vm | Where-Object {$_.PowerState -eq “poweredoff”} | move-vm -Destination ( Get-ResourcePool x -Location B ) -Confirm -Verbose
move-vm : 2/4/2015 12:26:26 PM Move-VM Destination is a Resource Pool owned by a Cluster, but the VM you are trying to move is not in that Cluster. Please select
for destination a Host in that Cluster or a Resource Pool owned by a stanalone Host.
At line:1 char:104
- Get-ResourcePool prod-max-01 -Location x* | get-vm | Where-Object {$_.PowerSta …
-
+ CategoryInfo : InvalidArgument: (prod-max-01:ResourcePoolImpl) [Move-VM], VimException + FullyQualifiedErrorId : Client20_VmHostServiceImpl_MoveVm_ResourcePoolOwnedByCluster,VMware.VimAutomation.ViCore.Cmdlets.Commands.MoveVM
Why does this not work? How would I make this work?