Thanks. How can I make it displaying the vCenter name?
foreach ($vm in $vmlist) {
Connect-VIServer -Server $vm
$viewLicMgr = Get-View $global:DefaultVIServer.ExtensionData.Content.LicenseManager
$report += $viewLicMgr.Licenses
Disconnect-VIserver $vm -Confirm:$false
}
$report | Export-Csv D:\Scripts\License\licenses.csv -NoTypeInformation -UseCulture
I would like the report to display the vCenter name so I know which vCenter the license belong to....