VMWare Power CLI in the Gallery
03, MayIn this post I talk about installing the VMWare PowerCLI.
Working with VMWare cmdlets was a bit cumbersome. But now things have changed.
It's a lot easier to install PowerCLI, now that it's available in the PowerShell Gallery.
Before
In order to use PowerShell with VMWare, we first had to find the right resources. On the VMWare website we had to download VMWare vSphere PowerCLI, for which we needed a login. Maybe the old instructions are still there.
The VMWare team had developed their own shell, containing multiple snapins:
- VMware.DeployAutomation
- VMware.ImageBuilder
- VMware.VimAutomation. Core
and at the same time, also some modules:
- VMware.VimAutomation.Cis.Core
- VMware.VimAutomation.Common
- VMware.VimAutomation.Sdk
If we loaded all those components the way we're used to, using Add-PsSnapin VM*
for instance, we could cause trouble. Apparently the order of loading was of some influence too. So, we needed to know there was a script included to do it all properly ( well..., their kind of properly, that is ). Following a default installation, we could find that at "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1".
Some people were so nice to write us a manual on how to do all of this: fgrehl on Virten.
The team had, however, announced they were working to improve their system, at least since V 6.3 (2016-04-07).
After
Recently, 2017-04-20, a new version, 6.5.1, was released and the VMWare team were proud to let us know their module is now available on the PowerShell Gallery: PowerCLI
They also wrote a handy "how to" on the VMWare blog](https://blogs.vmware.com/PowerCLI/2017/04/powercli-install-process-powershell-gallery.html)
but maybe you better read Michael Seirer's blog post first.
Do remove the old versions before you
PS> Install-Module -Name VMware.PowerCLI
One little complication I had, because of having Jan Egil Ring's PSVersion, was the error
So, I had to add the -AllowClobber
switch again.
After the successful installation, there's a bunch of dependent modules:
no console
Do notice that the VMWare Remote Console is no longer installed together with the module. That too is how it should be. We like it this way!
You can download the console separately if you want to.
Thank you
This new version really is a leap forward. The VMWare team made their powershell component a lot more compliant and reliable for all PowerShell adepts.
So thank them for that.