New Method for Installing PowerCLI

New Method for Installing PowerCLI

Starting with the newest version of PowerCLI, 6.5.1, the method for installation has changed from the typical MSI file to using the PowerShell Gallery.

Step 1. Uninstall PowerCLI

The first step is to uninstall PowerCLI from your system.  To do this use Add/Remove Programs.

Uninstall PowerCLI via Add/Remove Programs

Before Installing the New PowerCLI, the old installation needs to be removed.  Once the uninstall has completed, verify that the PowerCLI folder has been removed also by looking in the following directory.

PowerCLI folder location
If this folder exists, delete it

Step 2.  Find the PowerCli Module in the PowerShell Gallery

Using the following command you will be able find the new PowerCLI module in the PowerShell Gallery.

 Find-Module -Name VMWare.PowerCLI
Find-Module -Name VMware.PowerCLI
This is the command to use to find the PowerCLI module

When this command is first ran, especially if this is the first time looking for modules from the PowerShell Gallery, you might get a message like the one below:

Prompt for upgrade NuGet
Prompt for upgrade NuGet Provider

So when you see this message you should just click ‘Yes’ to continue.

Step 3.  Install the PowerCLI Module

This step is straight forward, run the following command to install the module for the current user:

Install-Module -Name VMware.PowerCLI -scope CurrentUser

If this is a shared PC or you are installing it on a server that needs all users the ability to access the PowerCLI module use the following command*:

Install-Module -Name VMware.PowerCLI -scope AllUsers
Install-module command
Command for current user and all users install

*Note: PowerShell will need to be ran as administrator for the allusers installation

Step 4. Enjoy PowerCLI!

To enjoy your newly installed PowerCLI module just run the following command:

Import-Module VMware.PowerCLI
Import-Module
Import-Module VMware.PowerCLI

-Stuart

2 thoughts on “New Method for Installing PowerCLI”

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.