This little script use to work in 5.5, it adds information to the annotations fields per virtual machine.
I pull the information from a CSV file
What changes need to be done to get to work in powercli 6.0
Thank You
# Import the CSV file to a variable
$vms = Import-CSV C:\Scripts\RFS.csv
# Iterate through the virtual macines and update the custom attributes
foreach ($vm in $vms){
Get-VM -Name $vm.name | Set-CustomField -Name Creator -value $vm.creator |
Set-CustomField -Name Owner -value $vm.owner |
Set-CustomField -Name Purpose -value $vm.purpose |
Set-CustomField -Name RFS -value $vm.rfs |
Set-CustomField -Name TargetENDdate -value $vm.enddate
}