I'm looking for a powercli script that will migrate a group of VM's from a list from their current datastore or datastore cluster to a new datastore or datastore cluster maintaining the same disk format thick or thin that they currently have.
Thanks,
Pete
What do you already have?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hey Luc - Sorry I haven't responded I was out for a few days. I came up with the two scripts below and they're working.
foreach($vmlist in (Get-Content -Path C:\TEMP\vmlist.txt)){
$vm = Get-VM -Name $vmlist
Move-VM $vm -Datastore SVC_PRD_C01 -DiskStorageFormat Thin -RunAsync
}
or
##All VM's in a datastore cluster or datastore to another.
Get-VM -Datastore Source Datastore Name | Move-VM -Datastore Target Datastore -DiskStorageFormat thin -RunAsync