Finding Vendor specific VIBs on ESXi hosts with PowerCLI

 

Example showing VIBs loaded on a host with a search of the vendor name "VMware"

 

The other day I was trying to find a list of Custom VIBs (VMware Installation Bundles) that were installed on an ESXi host. The reason was that I just wanted to verify that the VIB had actually installed correctly or not. I threw the query out on Twitter and of course @alanrenouf had a solution in next to no time.

So Alan’s solution is to use the Get-EsxCli cmdlet and specify the host name using the VMHost parameter. After that, he simply uses the code property “software” to gain access to the list of VIBs on the host. E.g.

$ESXCLI = Get-EsxCli -VMHost esxi-01.noobs.local
$ESXCLI.software.vib.list()

I have used esxcli on its own before but didn’t realise that PowerCLI had this cmdlet built in to interface with hosts in the same way that esxcli would. This is a great solution and means you can fetch so much more in this regard.

To filter things down a bit more and find the exact match for the Dell OMSA VIB I was looking out for, I used a where clause looking for a match for “dell” on the Vendor property:

$ESXCLI.software.vib.list() | Select AcceptanceLevel,ID,InstallDate,Name,ReleaseDate,Status,Vendor,Version | Where {$_.Vendor -match "dell"}

Thanks again to Alan Renouf for pointing out the use of Get-EsxCli and for providing an example!

 

4 thoughts on “Finding Vendor specific VIBs on ESXi hosts with PowerCLI”

  1. @Sean
    How do you get it to print the host name, so if you are using the script in the comment you know which of the 20 hosts do or do not have the OMSA vib installed?

  2. Hey Michael,

    Here is a script to do just that:

    $AllHosts = Get-VMHost | Where {$_.ConnectionState -eq “Connected”}
    foreach ($VMHost in $AllHosts) {
    $ESXCLI = Get-EsxCli -VMHost $VMHost
    $ESXCLI.software.vib.list() | Select AcceptanceLevel,ID,InstallDate,Name,ReleaseDate,Status,Vendor,Version | Where {$_.Vendor -match “dell”}
    }

    you can modify the “dell” bit right at the end to match on “omsa” if you want to be more specific though, just change the $_.Vendor to something like $_.Name and use -match “omsa” or whatever the VIB for OMSA is called.

    Cheers,
    Sean

Leave a Comment