How about this, haven't tested it so I would test first.
csv headers
vmname,folderid
$vmlist = import-csv vm_placement.csv
$vmlist | % {
$folder = Get-Folder -id $vmlist.folderid
Move-VM -VM $vmlist.vmname -destination $folder
}
How about this, haven't tested it so I would test first.
csv headers
vmname,folderid
$vmlist = import-csv vm_placement.csv
$vmlist | % {
$folder = Get-Folder -id $vmlist.folderid
Move-VM -VM $vmlist.vmname -destination $folder
}