PoshCode Logo PowerShell Code Repository

Moving a VMware offline VM within the VI without changing its Datastore

  1. $vm = get-vm testvm
  2. $ds = $vm | get-datastore
  3. move-vm -VM $vm -Destination (get-vmhost MyDestination) -Datastore $ds

Submit a correction or amendment below (
click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:


Remember me