Install PowerCLI

You can install PowerCLI by running a PowerShell command. You can install all official modules with a single command, or install modules individually.

The PowerCLI modules are available on the PowerShell Gallery Web site. When you run Install-Module from the PowerShell prompt, the command downloads and installs the specified module. For a list of available PowerCLI modules, see the PowerShell Gallery Web site.

Prerequisites

  • Before installing PowerCLI, see Prerequisites for Installing and Running PowerCLI.
  • Verify that you have uninstalled PowerCLI 6.5 R1 or earlier from your system.
  • Verify that your system is connected to the Internet.
  • Verify that you have registered the PowerShell Gallery as a local repository.
  • If you use Windows PowerShell 3.0 or 4.0, install the PowerShellGet and PackageManagement modules from the PowerShell Gallery Web site.

Procedure

  1. Open the PowerShell console.
  2. To install all official PowerCLI modules, run the following command.
    Install-Module VMware.PowerCLI -Scope CurrentUser

What to do next

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