Install VMware PowerCLI

VMware

You can install VMware PowerCLI via either the online installer, i.e direct into PowerShell, or via an offline installer. The offline installer instructions can be found here.

For online installation, you can perform the following steps:

Step 1 – Open PowerShell, you may need to “Run as Administrator”.

Step 2 – Install all PowerCLI modules with the following command:

Install-Module VMware.PowerCLI -Scope CurrentUser

You can install individual PowerCLI modules by running the “Install-Module” cmdlet with the module name.

If you see a warning that you are installing from an untrusted repository, press “y” and then press Enter to confirm the installation.

Step 3 – Next import the VMware VIM automation core module with:

import-module vmware.vimautomation.core

If you get issues with execution policy, you may need to un-restrict the policy as follows:

set-executionpolicy -executionpolicy unrestricted

Step 4 – Once installed, verify it has been installed correctly by running the following command:

Get-Module VMware* -ListAvailable

Step 5 – Make a test connection to a vCenter, this assumes that you are using Windows Authentication:

connect-viserver -server vcenter.domain.com

Leave a Reply

Your email address will not be published. Required fields are marked *