Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 180460

svmotion script from csv file

$
0
0

trying to move a bunch of vms from one host to another

 

csv file is

 

NameDST_Net
DST_DS
vm1VM NetworkDS1
vm2VM NetworkDS1
vm3VM NetworkDS1
vm4VM NetworkDS1

 

 

 

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


Viewing all articles
Browse latest Browse all 180460

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>