Hi
I'm looking to script some storage vmotion activity and I am new to VMware PowerCLI
I am using the script below
Import-Csv c:\cla\clatest.csv | Foreach {Get-VM $_.Name | Move-VM -DiskStorageFormat Thin -Datastore $_.NewDatastore -RunAsync}
and I have the .csv file mentioned with the following content
Name | NewDatastore |
cla_vm01 | cla_datastore02 |
this VM and this datastore exist
I connect to my vCenter server and when i run the command from PowerCLI i don't get an error but nothing happens - any help would be great
these commands work perfectly so i know the PowerCLI session is logged in correctly etc
Get-Datastore "cla_datastore01" | Get-VM | Move-VM -DiskStorageFormat Thin -Datastore "cla_datastore02" –RunAsync
Get-Datastore "cla_datastore02" | Get-VM | Move-VM -DiskStorageFormat Thin -Datastore "cla_datastore01" –RunAsync
Thanks
Chris