Installing and Running PowerCLI on Linux


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, 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.


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


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

2 Responses to “Installing and Running PowerCLI on Linux”

  1. Micah says:

    Hi I am trying to follow your directions in order to install, but I am getting the following error:

    gt: The term ‘gt’ is not recognized as the name of a cmdlet, function, script file, or operable program.
    Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    Save-Module: Cannot find the path ‘~/modules’ because it does not exist.

    Do you happen to know why this is?

  2. Micah says:

    Ignore the previous reply, but I think I fixed it but I am now wondering about this error, I think something might be wrong with PSGallery for me but not sure what:

    PS /home/k610937> Save-Module -Name VMware.PowerCLI -Path ./modules
    WARNING: Unable to resolve package source ‘’.
    Save-Package: /opt/microsoft/powershell/7-lts/Modules/PowerShellGet/PSModule.psm1:11792
    Line |
    11792 | $null = PackageManagement\Save-Package @PSBoundParameters
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | No match was found for the specified search criteria and module name ‘VMware.PowerCLI’. Try Get-PSRepository to see all available registered module repositories.

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.