Use PowerCLI to List Installed VIBs on ESXi

Recently I upgraded my environment to VMware 7u3c, but I had concerns about the issue with the i40enu VIB. Some of my hosts were running the version of ESXi that were listed as having the renamed VIB. So I really didn’t want to have to mess with downloading the python script, transferring it to the vCenter to run it. So I wrote a small script that will check for the installed VIBs that start with i40e* from a PowerShell/PowerCLI session from all of my hosts.

$VMhosts = Get-VMhost
$report = @()
Foreach ($VMhost in $VMHosts){
    $Line = "" | select Name, VIBs
    $ESXcli = Get-EsxCli -VMHost $VMhost -V2
    $VIBS = ($ | Where Name -Like "i40e*").name -join ", "
    $line.Name = $
    $Line.VIBs = $VIBS
    $report += $Line
$report | Sort -Property Name

Once the script is ran, it will display the following output so it can be reviewed.

If you were to find the bad VIB, i40enu, you can easily remove it with PowerCLI. After putting the host into maintenance mode you can run the following that will uninstall the VIB.

$VMhost = Get-VMhost "VMhost_Name_Here"
$ESXcli = Get-EsxCli -VMHost $VMhost -V2

Once the above script is ran, the host will need to be removed to complete the uninstall of the VIB. Make sure to test in a lab before running in production environment.


Extra Reading: – vSphere Lifecycle Manager can show non-compliant status after rollup Remediation, new cluster creation or transition from Baseline-managed cluster to Image-managed cluster for few upgrade paths due to i40en/i40enu driver name change. (85982) – VMware vCenter Server 7.0 Update 3c┬áRelease Notes

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.