VMware PowerCLI is a command-line and scripting tool built on Windows PowerShell and provides more than 600 cmdlets for managing and automating VMware products and features.

Online Installation using the PowerShell Gallery:

1- Determine Current PowerShell Version:

PS C:\> $PSVersionTable.PSVersion

2- Finds VMware PowerCLI modules from the PS online gallery

PS C:\> Find-Module -Name “VMware.Powercli” -AllVersions | Format-List Name,Version

3- Install VMware PowerCLI module that meets specified criteria from PS online gallery

PS C:\> Install-Module -Name VMware.PowerCLI -RequiredVersion 6.5.2.6268016 -Scope CurrentUser

4- Verify the Installation of the VMwarePowerCLI module that has been installed

PS C:\ > Get-Module -ListAvailable | where {$_.Name -like “VMware.Powercli”} | Format-List Name,Version 

5- Create desktop shortcut for VMwarePowerCLI module  using the target

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noe -c “Import-Module VMware.PowerCLI”

6- Update VMware PowerCLI to the latest version

PS C:\> Update-Module -Name VMware.PowerCLI

Offline Installation:

1- Download the VMware PowerCLI module using a computer that has internet access

PS C:\> Save-Module -Name VMware.PowerCLI -Path C:\PowerCLI

2- Copy and replace the individual VMware PowerCLI module folders to one of the following locations on the target computer

  • Current user usage: %userprofile%\Documents\WindowsPowerShell\Modules
  • All users usage: %SystemRoot%\System32\WindowsPowerShell\v1.0\Modules

References:

Advertisements