search
top

Installing and Running PowerCLI on Linux

Introduction

The wait is over, you can now run PowerCLI on Linux. This is due to Microsoft PowerShell Core 6.x and .NET Core which includes the modules.

According to labs.vmware.com, PowerCLI Core uses Microsoft PowerShell Core and .Net Core to enable users of Linux, Mac and Docker to now use the same cmdlets which were previously only available on windows.

PowerCLI Core enables a multi-platform scripting language which will allow you to manage your VMware infrastructure on any OS. Scripts written previously against the windows version are now made portable to a number of operating systems and can simply be loaded and run on these new OS versions without change.

VMware PowerCLI is a command-line and scripting tool built on Windows PowerShell, and provides more than 600 cmdlets for managing and automating vSphere, vCloud, vRealize Operations Manager, vSAN, NSX-T, VMware Cloud on AWS, and VMware Horizon environments.

PreRequsites

As mentioned in the introduction PowerCLI is part of Microsoft PowerShell Core 6.x which we have covered in a previous post here. Now we can proceed to downloading and installing PowerCLI.

Downloading and Installing

Start pwsh session on Linux and have an Internet Connection, the Path will be where you want to save the downloaded modules

The following modules are downloaded

VMware.VimAutomation.Sdk
VMware.VimAutomation.Common
VMware.Vim
VMware.VimAutomation.Core
VMware.VimAutomation.Srm
VMware.VimAutomation.License
VMware.VimAutomation.Vds
VMware.VimAutomation.Vmc
VMware.VimAutomation.Nsxt
VMware.VimAutomation.vROps
VMware.VimAutomation.Cis.Core
VMware.VimAutomation.HA
VMware.VimAutomation.HorizonView
VMware.VimAutomation.PCloud
VMware.VimAutomation.Cloud
VMware.DeployAutomation
VMware.ImageBuilder
VMware.VimAutomation.Storage
VMware.VimAutomation.StorageUtility
VMware.VumAutomation

Now we can install the modules for your user ID, for this you will need to run the command

May get this popup

Modules will be installed to your home directory.

We can check the installation and import the module in a single command

Note: May see an error for modules not supported.

What’s Next

Now that we have PowerCLI installed, you can start exploring and connecting to VMware. Few usable links for PowerCLI  are here.

PowerCLI 10 Release Notes

PowerCLI  10 Users Guide

Cmdlet Reference

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.

top