VMware PowerCLI

VMware PowerCLI 6.5.1 New Way to Install

With the VMware PowerCLI 6.5.1 New Way to Install, we can now directly install PowerCLI from the PowerShell gallery without the need for MSI installation

If you haven’t updated your VMware PowerCLI installation in a while, you will be interested to know there is a new way to install VMware PowerCLI. ย With the release of VMware PowerCLI 6.5.1, we can now pull the PowerShell module directly from the Powershell gallery instead of the legacy MSI installation method that we have become familiar with. ย This new method is a welcomed departure from the previous installation method. ย The integration with PowerShell feels much smoother and more native now that we can simply install from the gallery in this module based format. ย The VMware PowerCLI 6.5.1 new way to install is a step in the right direction and a great path forward! ย Let’s take a look at this process.

VMware PowerCLI 6.5.1 New Way to Install

The VMware PowerCLI 6.5.1 new way to installย is well documented on the VMware official blog post here. ย However, I wanted to show you guys a couple of things I ran into, as well as the simple change to get integration with PowerShell ISE working again with this new version.

The first thing we need to do to move forward with the VMware PowerCLI 6.5.1 new way to install is we need to uninstall the old MSI file. ย To do this we simply remove the program in programs and features.

pcli651_01

Now that we have uninstalled the MSI installation, we can begin the new installation method. ย We use the PowerShell commands below to find the module and install it.

Find-Module -Name VMware.PowerCLI

pcli651_02

To install the new PowerCLI for all users, we need to use an administrative PowerShell session and use the -Scope command for AllUsers:

Install-Module -Name VMware.PowerCLI -Scope AllUsers

To avoid needing an admin PowerShell session, you can use the scope for CurrentUser instead.

Install-Module -Name VMware.PowerCLI -Scope CurrentUser

VMware PowerCLI 6.5.1 Install Error

When I ran the installation command scoped toย AllUsers I received an error about overwriting existing commands. ย However, I followed the directive listed to use theย -AllowClobber parameter to force the overwrite just in case any one else has this issue.

Install-Module -Name VMware.PowerCLI -Scope AllUsers -AllowClobber

pcli651_03 pcli651_04

Verifying the Installation

After the installation is complete, you can verify you are using the latest VMware PowerCLI version 6.5.1 by using theย get-module command like so.

Get-Module VMware*

pcli651_05

VMware PowerCLI 6.5.1 PowerShell ISE integration

For those using PowerShell ISE who were using the old command to load VMware PowerCLI into your PowerShell ISE profile, we only need to make a small change to the profile file.

My profile looked like the below before the 6.5.1 version. ย I used the command:

& 'C:Program Files (x86)VMwareInfrastructurePowerCLIScriptsInitialize-PowerCLIEnvironment.ps1'

poshisepwrcli01

This is now greatly simplified in the profile as we can now simply add:

Import-Module VMware.PowerCLI

poshisepwrcli02

Thoughts

Theย VMware PowerCLI 6.5.1 new Way to install is definitely a great new leap forward for PowerCLI and its integration with PowerShell in general. ย This new module based approach pulling directly from the PowerShell gallery without the need to install from an MSI file is way better in my opinion. ย It now truly “feels” like PowerCLI is tightly integrated with PowerShell. ย We can only imagine even better things to come in the future road map of PowerCLI

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

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.