Install VMware PowerCLI Offline

Reading Time: 3 minutes

Install VMware PowerCLI Offline is an article that explains all procedures to install the VMware PowerCLI from the Offline package.

Basically, VMware PowerCLI is a command-line and scripting tool built on PowerShell and provides more than 7000 cmdlets for managing and automating VMware vSphere, VMware Cloud Director, vRealize Operations Manager, vSAN, VMware NSX-T, VMware Cloud Services, VMware Cloud on AWS, VMware HCX, VMware Site Recovery Manager, and VMware Horizon environments.

So, in my opinion, every “VMware” Guy needs to know a little about VMware PowerCLI 🙂

In this article, we will explain how to download and install the VMware PowerCLI 13.1.0 Offline Package (the newest version when I am writing this article).

By the way, we have another article that explains a little about this tool. Click here to access this article (but in this article, we explain how to install VMware PowerCLI Online – If your Desktop or Jump Server has Internet Access, you can use the Online way to install VMware PowerCLI).

Firstly, some useful links

— VMware PowerCLI 13.1.0 main page:
https://developer.vmware.com/web/tool/13.1.0/vmware-powercli

— Download VMware PowerCLI 13.1.0 – OFFLINE Package:
https://vdc-download.vmware.com/vmwb-repository/dcr-public/2142f98d-f49c-4972-8f73-c2697aa744cd/37af7f1b-e6d5-47ac-9daf-7eecf86358f1/VMware-PowerCLI-13.1.0-21624340.zip

— VMware PowerCLI User’s Guide:
https://developer.vmware.com/docs/15315/powercli-user-s-guide/GUID-2F2AC097-C02C-4F05-81D9-D1D99CB7FED1.html

Steps to Install VMware PowerCLI

1. Open PowerShell on your local machine. I recommend opening PowerShell with Admin Rights;

2. Download the VMware PowerCLI Offline Package and extract the .zip file;

3. To view the folder paths to which you can copy all extracted files, run the command:

$env:PSModulePath

For example:

4. In this example, we will copy all extracted content into the directory:

C:\Windows\system32\WindowsPowerShell\v1.0\Modules

5. Run the command below to unblock the copied files:

Get-ChildItem -Path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules' -Recurse | Unblock-File

6. Verify that the VMware PowerCLI modules have been installed successfully:

Get-Module VMware* -ListAvailable

7. Allow Execution of Local Scripts:

Set-ExecutionPolicy RemoteSigned

8. Configure the VMware PowerCLI response to Untrusted Certificates:

Set-PowerCLIConfiguration -InvalidCertificateAction Prompt

9. Configure Customer Experience Improvement Program. In this example, we are setting to not participate in this program:

Set-PowerCLIConfiguration -ParticipateInCeip $false

10. Connect to your vCenter Server:

Connect-VIServer -Server vcenter8.vxrail.local -Protocol https -User administrator@vsphere.local

Where:
vcenter8.vxrail.local = Is the vCenter Server FQDN for my vCenter Server. You should replace it with the FQDN or IP address of your vCenter Server

11. After that, we can run the commands:

To disconnect to the vCenter Server, you can use the below command:

Disconnect-VIServer

Note: The below link has all supported tasks and commands to manage a vSphere Environment by PowerCLI:
https://developer.vmware.com/docs/15315/powercli-user-s-guide/GUID-3E36F4EA-3742-48BA-BB4B-7E0A2EAAE83E.html