Install Powershell and PowerCLI on Linux

I have been working on setting up a nested VSphere lab in VMWare Workstation the past few weeks and wanted to have a simple jump box with minimum resources that I could use to test out PowerCLI scripts I have been writing. As I am very familiar with working with Linux operating systems and now that Microsoft supports PowerShell Core on Linux distributions I wanted to see if I could get PowerShell and PowerCLI installed on two Linux test servers (Ubuntu 18.04 LTS and CentOS 7) that I have setup already in the lab.

Add the PowerShell Repository

To install PowerShell Core I first had to add the official Microsoft repository.

CentOS 7

Ubuntu 18.04

Install PowerShell

Now that the repositories were configured the next step was to install PowerShell. 

CentOS 7

Ubuntu 18.04

Install PowerCLI

Now that PowerShell was successfully installed I could start it and install PowerCLI.

Since I am using the default self-signed certificate on my lab VCenter server I got an error that the SSL connection could not be established. To fix that  I set the PowerCLI configuration to ignore invalid certificates. I also set the Participate in VMware Customer Experience Improvement Program ("CEIP") to false and disabled the Web Operations timeout.

After setting the PowerCLI configuration I was successfully able to connect to my lab VCenter server.


Popular posts from this blog

Change Password on all Hosts in VCenter

Resetting Customization Spec Password after VCenter Upgrade

Copying Large Files Using Copy-VMGuestFile