Hi first time post / ask something here. I am new to powercli and would appreciate some asstiance with the above. To To clarify I would like to;
Read a list of virtual machine names from a .txt file OR possibly a .csv (as i attempted below) file into an Arrary.
I made an attempt with the following that failed
$vms = @()
for (i$ in (import-csv vmlist.csv)) {$vms += get-vm -name i$}
Example Text File.
virtualMachine1
virtualMachine2
virtualMachine3