$csv= import-csv c:\temp\test.csv
foreach ($line in $csv)
{
Get-View -ViewType VirtualMachine -property @("Name","guest.HostName", "guest.GuestFullName") -Filter @{"Name"= $($line.vm) }|`
Select-object Name,
@{N="FQDN";E={$_.guest.HostName}},
@{N="OS ";E={$_.guest.GuestFullName}},
}
above works well
But i am not able to get this in csv i tried appending "| Export-Csv -NoTypeInformation -UseCulture c:\test.csv" but gives only last row ...
I asked this Q in past as well but sorry forgot the solution offered here .. some parameter like @ was used to make the loop as a single values but do not remember ... LucD i think you told me that ...