PowerCLI 11.1.0 – More on Linux Side

During the last few days of December 2018, VMware released the 6th PowerCLI version of the year: PowerCLI 11.1.0. The coolest new features move around Site Recovery Manager:

Support for SRM module in MacOS and Linux

Support for Site Recovery Manager 8.1 API features

VMware.VimAutomation.Storage module received updates on 2 cmdlets: Get-VsanDisk and Start-SpbmReplicationTestFailover

There is nothing new on the install / update routines for Windows, so if you need guidance you can take a look at one of my previous article: VMware PowerCLI 10.1.0.

Install PowerCLI 11.1.0 on Linux

I previously wrote about how to install PowerCLI on Linux in the article PowerCLI 10.0.0 Linux Error in VMware.VimAutomation.Srm Module. There are few changes to the PowerShell Core installation procedure and also few more PowerCLI modules are supported on Linux (as a result there are few changes also to the workaround to make it work).

I will show below how to install PowerShell Core 6.1.1 and PowerCLI 11.1.0 on Ubuntu 16.04. At the moment of writing this article, Ubuntu 16.04 LTS is the only supported Linux version for PowerCLI (see Compatibility Matrixes for VMware PowerCLI 11.1.0).

First step for PowerShell installation is to download the Microsoft repository GPG keys :

Import-Module : VMware.VimAutomation.License module is not currently supported on the Core edition of PowerShell.

Import-Module : VMware.VimAutomation.License module is not currently supported on the Core edition of PowerShell

Some of the PowerCLI modules are still not compatible with PowerShell Core. For PowerCLI to work, I had to disable some modules from loading when PowerCLI starts. The file where PowerCLI keeps its dependencies is VMware.PowerCLI.psd1. In my case, the full path to the file was:

#Modules that must be imported into the global environment prior to importing this moduleRequiredModules = @(@{“ModuleName”=”VMware.VimAutomation.Sdk”;”ModuleVersion”=”11.0.0.10334495″}@{“ModuleName”=”VMware.VimAutomation.Common”;”ModuleVersion”=”11.0.0.10334497″}@{“ModuleName”=”VMware.Vim”;”ModuleVersion”=”6.7.0.10334489″}@{“ModuleName”=”VMware.VimAutomation.Core”;”ModuleVersion”=”11.0.0.10336080″}@{“ModuleName”=”VMware.VimAutomation.Srm”;”ModuleVersion”=”11.1.0.11289292″}@{“ModuleName”=”VMware.VimAutomation.License”;”ModuleVersion”=”10.0.0.7893904″}@{“ModuleName”=”VMware.VimAutomation.Vds”;”ModuleVersion”=”11.0.0.10336077″}@{“ModuleName”=”VMware.VimAutomation.Vmc”;”ModuleVersion”=”11.0.0.10336076″}@{“ModuleName”=”VMware.VimAutomation.Nsxt”;”ModuleVersion”=”11.0.0.10364044″}@{“ModuleName”=”VMware.VimAutomation.vROps”;”ModuleVersion”=”10.0.0.7893921″}@{“ModuleName”=”VMware.VimAutomation.Cis.Core”;”ModuleVersion”=”11.0.0.10335701″}@{“ModuleName”=”VMware.VimAutomation.HorizonView”;”ModuleVersion”=”7.6.0.10230451″}@{“ModuleName”=”VMware.VimAutomation.Cloud”;”ModuleVersion”=”11.0.0.10379994″}@{“ModuleName”=”VMware.DeployAutomation”;”ModuleVersion”=”6.7.0.11233116″}@{“ModuleName”=”VMware.ImageBuilder”;”ModuleVersion”=”6.7.0.11233116″}@{“ModuleName”=”VMware.VimAutomation.Storage”;”ModuleVersion”=”11.1.0.11273342″}@{“ModuleName”=”VMware.VimAutomation.StorageUtility”;”ModuleVersion”=”1.3.0.0″}@{“ModuleName”=”VMware.VumAutomation”;”ModuleVersion”=”6.5.1.7862888″}@{“ModuleName”=”VMware.VimAutomation.Security”;”ModuleVersion”=”11.0.0.10380515″})

We need to disable the incompatible modules: VMware.VimAutomation.License, VMware.VimAutomation.vROps, VMware.VimAutomation.HorizonView, VMware.VimAutomation.DeployAutomation, VMware.VimAutomation.ImageBuilder, and VMware.VimAutomation.VumAutomation. Compared with last time I checked PowerCLI for Linux (version 10.0.0), there are two more modules supported: VMware.VimAutomation.Srm and VMware.VimAutomation.Cloud. You need to comment each of the lines containing unsupported modules by placing a # at the beginning of the line: