Install VMware PowerCLI from Windows Powershell

Copy and Paste the following command to install this package using PowerShellGet

Install-Module -Name VMware.PowerCLI

If you are getting any error related to the privilege

PS C:\Users\asvig> Install-Module -Name VMware.PowerCLI
Install-Module : Administrator rights are required to install modules in ‘C:\Program Files\WindowsPowerShell\Modules’. Log on to the
computer with an account that has Administrator rights, and then try again, or install

Run with adding -Scope CurrentUser

 Install-Module -Name VMware.PowerCLI -Scope CurrentUser 

In addition to that you may need to set Execution policy to RemoteSigned

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

by running the above command in Administrator mode, and also import Import-Module VMware.VimAutomation.Core before start using powercli commands

Also published on Medium.

This site uses Akismet to reduce spam. Learn how your comment data is processed.