April 05, 2018

Installing PowerCLI 10 in Debian 9

Installing PowerCLI 10 in Debian 9
 

The PowerCLI compatibility matrix states PowerShell 6.0.1 is supported. 6.0.2 and 6.1.0-Preview is not. (reference)

Firstly, install PowerShell [almost] as per documentation: (reference) or (reference)
sudo apt remove --purge powershell
sudo apt install libc6 libgcc1 libgssapi-krb5-2 liblttng-ust0 libstdc++6 libcurl3 libunwind8 libuuid1 zlib1g libssl1.0.2 libicu57 libssl1.0.0 libssl1.0.2 libssl1.1 libicu52 libicu57 curl gnupg apt-transport-https
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/microsoft.list'
sudo apt update
sudo apt install -y powershell=6.0.1-1.debian.9
sudo apt-mark hold powershell        #Pin this version... 'unhold' for non-recommended versions
pwsh

If you get a Segmentation fault you must sudo apt remove --purge libssl1.0.0!

Install PowerCLI inside PowerShell: (reference)
Install-Module -Name VMware.PowerCLI -Scope CurrentUser
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore   #Accept self-signed certificates
You may later update with
Update-Module VMware.PowerCLI
Update-Help

If you want a scope of AllUsers, then you will have to install with sudo pwsh and perform subsequent update with sudo pwsh as well.

~~~
Good Luck!
Please consider crypto tipping:
  

No comments:

Post a Comment

Comments, Suggestions or "Thank you's" Invited! If you have used this info in any way, please comment below and link/link-back to your project (if applicable). Please Share.
I accept Bitcoin tips of ANY amount to: 1GS3XWJCTWU7fnM4vfzerrVAxmnMFnhysL
I accept Litecoin tips of ANY amount to: LTBvVxRdv2Lz9T41UzqNrAVVNw4wz3kKYk