PowerCLI help install, update and troubleshooting tips

PowerCLI is a must-have tool for every VMware Administrator when you want to automate something in your VMware environment. In this blog, I highlight the installation, updating, and some troubleshooting tips for deploying and running PowerCLI on Windows OSes.

PowerCLI installation

  • Uninstall PowerCLI 6.x and earlier from the Add/remove programs or Programs and Features if exist.
  • Make sure you have an internet connection.
  • Check if Windows Management Framework 5.1 is installed for Windows 7,8 and Windows Server 2012 R2 and earlier OSes. Open PowerShell en enter:
PS C:\$PSVersionTable

Name Value
---- -----
PSVersion 5.1.17763.592
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.592
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
  • If WMF 5.1 is not installed. Install the WMF 5.1 can be downloaded here, link. Windows 10, Windows Server 2016, and above have PowerShell version 5.1 already installed.
  • Installation PowerCLI
PowerCLI installation with admin rights:
Install-Module VMware.PowerCLI -AllowClobber -SkipPublisherCheck

Use the -AllowClobber when you get: A command with the name 'Export-VM' is already available on this system.
Install-Module VMware.PowerCLI -AllowClobber

Installation of PowerCLI without admin rights:
Install-Module VMware.PowerCLI -Scope CurrentUser

These modules are installed in the %homepath%\Documents\WindowsPowerShell\Modules
  • Allow the execution of local scripts
Admin rights needed:
Set-ExecutionPolicy RemoteSigned
  • Disable certificate checking and CEIP
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false -ParticipateInCeip $false
  • PowerCLI upgrade fails with a certificate error. The following error can occur when try to upgrade VMware.PowerCLI.

Install-Module VMware.PowerCLI -Force -SkipPublisherCheck

Install the VMware Horizon Module

  • Download the Horizon modules from GitHub: Link
  • Extract it
  • Copy the VMware.Hv.Helper folder to the modules path

Updating PowerCLI

The following steps can be used to update a PowerCLI 10 or 11 installation

  • Make sure you have a internet connection.
  • Check the PowerCLI version
Get-Module VMware* -ListAvailable
  • Update the existing PowerCLI version
Update-Module -Name VMware.PowerCLI
  • Check the version of PowerCLI
Get-Module -Name VMware.PowerCLI -ListAvailable

Troubleshooting PowerCLI

The following troubleshooting options can be used when having problems with the installation and running of PowerCLI such as:

Could not load file or assembly……………….

  • Disable the Anti Virus.
  • Uninstall PowerCLI 6.x and earlier from the Add/remove programs or Programs and Features if exist.
  • Uninstall PowerCLI.
Get-Module VMware.PowerCLI -ListAvailable | Uninstall-Module -Force
  • Check the  paths for VMware modules entries in the path. Remove VMware folder if exist.
  • List All the VMware modules and remove VMware modules.
Get-Module -Name VMware* -ListAvailable
  • Check for old PowerCLI modules and installations such as:
C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Modules
  • List registered snapins.
Get-PSSnapin -registered
  • Delete the registry keys of the old PS snapins.

  • Reboot the Windows system.

Try to install the PowerCLI module using a clean install as described above.


The PowerCLI page can be found here: VMware Developer Documentation


VIBSearch Finding VIB versions

VIBSearch is a simple PowerShell script with a GUI that will search for a specified VIB or all the VIBS installed on the ESXi hosts. A VIB stands for vSphere Installation Bundle (VIB). VIBs are used to package and distribute ESXi software such as drivers. The GUI is designed with SAPIEN PowerShell Studio 2014.

With VIBSearch it is easily to verify that all the ESXi host in the cluster have the same VIB versions installed. VIBSearch can be used for example to easily identify the HP-AMS driver version on all the ESXi hosts.


VIBSearch is tested with:

  • PowerShell 5
  • The latests PowerCLI modules
  • For the Out-GridView cmdlet, PowerShell ISE is needed. Install ISE by using the following PowerShell commands:
    • Import-Module ServerManager
    • Add-WindowsFeature PowerShell-ISE

Installing and executing VIBSearch

  • Download VIBSearch.txt, link
  • Open PowerShell and execute:
    • Set-ExecutionPolicy  unrestricted
    • ./vibsearch.ps1

After executing the script the following GUI appears:


  • To connect enter the FQDN or IP address of the vCenter name (1) and click on Connect (2) button


  • A credential window appear, enter the credentials for authenticating (administrator) to the vCenter Server. For a domain login use: user user@domainname  or domainname\username


  • After successfully authenticating to the vCenter Server there are two options to choose:
    • List All the VIBS:  List all the ESXi hosts in the vCenter Server
    • Search VIB: specify a VIB name for example “HP-AMS”


If authentication to the vCenter Server fails the following error is displayed in the PowerShell window:


Example output:

HP-AMS VIB versions


Intel NIC VIB “net-igb” versions


NVIDIA VIB versions:


Thanks to Francois-Xavier Cat (@LazyWinAdm) for helping me with the VIBSearch tool.