Colin Westwater

PowerCLI 6.5.1 Installation

PowerCLI 6.5.1 was released on Friday and the big change in this version is that it’s deployed using the PowerShell Gallery.

This is great - no more having to login the VMware portal, finding the installer, then installing. This is a great move that will really help people install PowerCLI onto their computers. The next great part of this version is the modules are loaded automatically when starting PowerShell! Simply start typing a PowerCLI cmdlet and PowerShell will load the PowerCLI module automatically.

Ensure Windows Management Framework 5 or greater is installed. You should always have the latest version installed which is at this time WMF 5.1. You can grab it here
Uninstall existing versions of PowerCLI
Install PowerCLI from the PowerShell Gallery.

These steps assume you already have the NuGet provider installed in PowerShell and the PowerShell Gallery is a trusted source.

There seems to be a few manual steps to perform, so lets script it. The script is kinda ugly but heck it works. I could spend more time to refine it honestly I don’t think it’s worth the effort - it works! The script does the following:

Checks WMF v5 or greater is installed

Installs NuGet if not already present

Uninstalls any previously installed versions of PowerCLI

Adds the PowerShell Gallery as a trusted source

Installs the PowerCLI module for all users

Confirms the modules have been installed

The prerequisite is you need WMF v5 or greater. The script will throw an error if you don’t have it installed. Secondly this installs PowerCLI for all users on the computer. If you just want it on your profile change -AllUsers on line 33 to -CurrentUser