Why do you import the CSV twice?
--> Yes indeed
And it seems that your requirement with different columns for vCenter and ESX is gone, they now are all under vCenter.
--> no, I have my vms from independent esx and vms from vcenter in my report
You need to provide the names of the 2nd and 3th column in the CSV, and then you can just include them on the Select-Object cmdlet.
--> Ok
Thank you