$VIBinstalled = @{}
#Get-VMHost | Sort Name | %{
Get-VMHost | Sort Name | %{
$VIBinstalled.Add($_,((Get-EsxCli -VMHost $_).software.vib.list() |
Where-Object {$_.Name -like "NetAppNasPlugin*"}) -ne $null)}
$VIBinstalled
==
Please suggest how can i get this in xls ? (works well without the export-csv)
I tried :
1. $VIBinstalled |exprot-csv c:\temp\temp.csv , does give only 1 row.
Try like this
$VIBinstalled = Get-VMHost | Sort Name | %{
$esxcli = Get-EsxCli -VMHost $_
$esxcli.software.vib.list() |
where{$_.Name -like "NetAppNasPlugin*"} |
Select @{N='Host';E={$esxcli.VMHost.Name}},Name,Version,Vendor
}
$VIBinstalled | Export-Csv report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
$VIBinstalled = Get-VMHost | Sort Name | %{
$esxcli = Get-EsxCli -VMHost $_
$esxcli.software.vib.list() |
where{$_.Name -like "NetAppNasPlugin*"} |
Select @{N='Host';E={$esxcli.VMHost.Name}},Name,Version,Vendor
}
$VIBinstalled | Export-Csv report.csv -NoTypeInformation -UseCulture
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference