trying to move a bunch of vms from one host to another
csv file is
Name | DST_Net | DST_DS |
---|---|---|
vm1 | VM Network | DS1 |
vm2 | VM Network | DS1 |
vm3 | VM Network | DS1 |
vm4 | VM Network | DS1 |
but below script not working
import-csv -Path "C:\scripts\svmotion_vms.csv" -UseCulture
{
write-progress -Activity svmotion -Status "Moving $_.name"
get-vm -name $_.name | move-vm -DiskStorageFormat $_.format -VMotionPriority High -Datastore $_.DST_DS -RunAsync -PortGroup $_.Dst_Net -Confirm:$false
}
any idea