Monthly Archives: April 2021

Updating PowerCLI and Cleaning Up Old Versions

Following the recent PowerCLI 12.3 release, I’m sure many will be rushing to make use of some of the great new additions which you can find information on here.

I thought I would quickly show the process of upgrading to the latest version whilst uninstalling any older versions you might still have installed. Partly because I’m playing with creating video content at the moment! Credit to @colinwestwater for his article on how to clean up old versions, blog post here.


Update-Module VMware.powerCLI

Get-InstalledModule -Name VMware.PowerCLI | ForEach-Object {
$CurrentVersion = $PSItem.Version
Get-InstalledModule -Name $PSItem.Name -AllVersions | Where-Object -Property Version -LT $CurrentVersion
} | Uninstall-Module -Verbose

Get-Module -Name VMware.PowerCLI