VMware PowerCLI on Debian Linux

By | 2018-06-08

Getting sick of Microsoft Windows and the ISE, I’ve installed VMware PowerCLI on my Debian Linux today. Everything could be done from your Shell, you do not need to download anything with your browser. Nice stuff – PowerCLI was installed in unter 2 minutes 😉

First you need to add some apt sources and install powershell:

vmware-collect:/root # curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

vmware-collect:/root # curl https://packages.microsoft.com/config/debian/9/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list

vmware-collect:/root # apt-get install apt-transport-https

vmware-collect:/root # apt-get update && sudo apt-get install powershell

In your newly installed powershell you need to install the VMware PowerCLI from the PowerShell-Gallery now:

vmware-collect:/root # pwsh
PS /root> Install-Module -Name VMware.PowerCLI

After this you were able to use the PowerCLI commands in the same way you are doing it on windows:

PS /root> Connect-VIServer -Server vcenter01.example.com -User alex
Specify Credential
Please specify server credential
Password for user alex: **********

PS /root> Get-VM -Name *test*
Name                 PowerState Num CPUs MemoryGB
----                 ---------- -------- --------
testVM1        PoweredOn  8        16.000

Very nice 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

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