trying to put the following into a report for multiple hosts. any suggestions?
get-advancedSetting -Name "syslog*", "vpx*" -Entity (get-dc | get-vmhost) | Sort-Object Name | ft -auto
it seems like a lot of columns per host and I want to know the best way to do this exporting to csv
thanks
You mean something like this?
Get-Datacenter -PipelineVariable dc |
Get-VMHost -PipelineVariable esx |
Get-AdvancedSetting -Name "syslog*", "vpx*" |
Select @{N='Datacenter';E={$dc.Name}},
@{N='VMHost';E={$esx.Name}}, Name,Value |
Export-Csv -Path .\report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You mean something like this?
Get-Datacenter -PipelineVariable dc |
Get-VMHost -PipelineVariable esx |
Get-AdvancedSetting -Name "syslog*", "vpx*" |
Select @{N='Datacenter';E={$dc.Name}},
@{N='VMHost';E={$esx.Name}}, Name,Value |
Export-Csv -Path .\report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
