Install PowerCLI

You can download and install PowerCLI modules from the PowerShell Gallery. You can install all VMware PowerCLI modules with a single PowerShell command, or install modules individually.

Use the Install-Module cmdlet to download and install PowerCLI modules. See the PowerShell Gallery for the complete list of available PowerCLI modules.

Prerequisites

  • Verify that your system is compatible with PowerCLI. See the Compatibility Matrix on the PowerCLI home page.
  • Verify that your system is connected to the Internet.
  • Verify that PowerShell is available on your system. For Linux and macOS, you must install PowerShell. See how to install PowerShell on different platforms.
  • For Windows, if you have PowerCLI 6.5 R1 or earlier, uninstall it.

Procedure

  1. Open PowerShell on your workstation.
  2. To install all PowerCLI modules, run the command:
    Install-Module VMware.PowerCLI -Scope CurrentUser
    Alternatively, you can install individual PowerCLI modules by running the Install-Module cmdlet with the module name.
  3. If you see a warning that you are installing modules from an untrusted repository, press y and then press Enter to confirm the installation.

What to do next

Enable execution of local scripts. See Allow Execution of Local Scripts.