VMware Cloud Community
esxi1979
Expert
Expert
Jump to solution

VIB audit

$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.

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

View solution in original post

1 Reply
LucD
Leadership
Leadership
Jump to solution

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