Reply to Message

View discussion in a popup

Replying to:
LucD
Leadership
Leadership

Try like this

$report = foreach($row in Import-Csv -Path vmnames.csv -UseCulture){

    Get-VM -Name $row.name |

    Select Name,NumCpu,MemoryGB,

        @{N='Location';E={$row.Location}},

        @{N='Owner';E={$row.Owner}}

}

$report | Export-Csv -Path newreport.csv -NoTypeInformation -UseCulture


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos