In most cases a machines are connected to the internet which allows a PowerCLI user download the modules directly from the web using:

Install-Module -Name VMware.PowerCLI

In the event the machine you wish to run PowerCLI scripts from is offline, then you can perform the following method of installation.

    1. Download the modules from a machine connected to the internet:

Save-Module VMware.PowerCLI -Path $env:userprofile\PowerCLI-Offline

Powercliinstall1

2. Select all the downloaded modules and copy them over to the WindowsPowerShell\Modules directory on the target offline machine:

Powercliinstall3

3. When attempting to run a connect cmd for the first time you will notice the following warning/error about CEIP and Certificates:

Powercliinstall4

 

4. You can clear the above warning/error with the following 2 commands:

Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false

Set-PowerCLIConfiguration -InvalidCertificateAction ignore -confirm:$false

Powercliinstall5

5. Connect-VIServer successful:

Powercliinstall6

 

6. Validate connectivity with some simple commands:

Get-VM | Select Name

Get-Datastore -Name DE*

Powercliinstall8

Useful Reference:

PowerCLI Cmdlet Reference

 

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s