I am trying to fetch advance configuration using this. Am I doing any error? Sometimes it is not showing blank CSV.
Add-PSSnapin "VMware.VimAutomation.Core"
Connect-VIServer vc1, vc2, vc3
$SettingName = 'svga.vgaOnly'
$date=get-Date -format "ddMMyy_HHmm"
Get-VM | Get-AdvancedSetting -Name $SettingName | Select Entity, Name, Value | ft -Autosize | Export-csv "SVGA_$date.csv"
-----------
Another point, how can we add vCenter name in csv output. It's generating only VM name, not vcenter. As I am retrieving for multiple vcenters, so need to filter out.
Get-VM | Get-AdvancedSetting -Name $SettingName | Select Entity, Name, Value
CSV Format is also not showing in columns, rather it is fetching all information only in one column and it needs manual work to format the output.