How to install PowerCLI module through Powershell

To automate vSphere task PowerCLI can make any Administrator’s job much easier. Here I’ll go step by step how to install PowerCLI module on your client system to administer your vSphere without every time login to vCenter UI console.

Install VMware PowerCLI Module on a system with Internet connection.

  • Open Powershell as ‘run as administrator’
  • Type command ‘Find-Module -Name VMware.PowerCLI’ below output will come
  • Run command ‘Install-Module -Name VMware.PowerCLI -Scope CurrentUser’ (in not opened powershell as run as administrator).

It will prompt you for untrusted repository say Yes and installation will begin

  • Run the command ‘Get-Command -Module *vmware*’   to check if you are able to see the vmware commands.

Install VMware PowerCLI Module on a system where Internet connection is not available or Perform an offline installation.

  • Login on a computer with internet connectivity.
  • Run command ‘Save-Module -Name VMware.PowerCLI -Path C:\temp’
  • Copy the downloaded files from C:\temp to the offline system where internet is not connected.
  • Moved the copied files to C:\Windows\System32\WindowsPowerShell\v1.0\Modules
  • Run command ‘Import-Module VMware.PowerCLI’

Enjoy you PowerCLI and start working.

If you think this post is helpful to you, please like & share. All comment are most welcome for further discussion.

Advertisement

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

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