The much anticipated PowerCLI Core was just released this week as a VMware Fling which allows you to run PowerCLI on Linux, Mac OS X or even as a Docker Container. This is HUGE if you ask me, especially for customers who would like the benefits of PowerCLI and not be forced to use a Windows system which it traditionally had required.

I personally have been using PowerCLI Core for quite some time now on my Mac OS X and the experience is exactly the same as you would find it on its Windows counterpart. The Docker Container is also a another great way to consume PowerCLI Core and I also use that quite frequently as well. One thing I felt that would make the Docker Container even easier to consume for those looking to do something really quick in PowerCLI or what I call "Just In time PowerCLI access" is to be able to quickly pull it down from Docker Hub rather than having to download bunch some files and then manually build it yourself (not that it is complicated) but sometimes speed is the game.

I had posted a tweet earlier this morning and literally a few hours later, my good friend Alan Renouf delivered the goods! In addition, you will also find that the new version of PowerCLI Core Docker Container is now using Photon OS image rather than Ubuntu as it previously did.

In addition to the three methods of consuming PowerCLI Core, you also now find it hosted on Docker Hub:

UPDATE (01/03/17) - It looks like PowerNSX is now also included with PowerCLI Core. To use PowerNSX, simply import it by running the following command: Import-Module PowerNSX and you will now have access to the PowerNSX cmdlets! Nice job to the PowerNSX guys for making this possible for our customers!

To access PowerCLI Core from Docker Hub, you simply just need a system installed with the Docker Client (Windows, Linux or Mac OS X) running or you can even use VMware's Photon OS which comes with Docker by default and following the instructions below:

Step 1 - Pull the PowerCLI Core image from Docker Hub by running the following command:

docker pull vmware/powerclicore

Step 2 - Run the PowerCLI Core Docker Container by running the following command:

docker run --rm -it --entrypoint='/usr/bin/powershell' vmware/powerclicore

It is literally that easy to access PowerCLI from ANY platform at ANY time! 😀

Step 3 - If you are using a self-signed certificate, you will need to run the following command below before you can call the Connect-VIServer cmdlet:

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false

7 thoughts on “PowerCLI Core is now available on Docker Hub!

  1. I applaud this effort, but would like more choices in programming languages. Do you know if VMware is working to provide a rest api for all the vsphere functions? That way, we could do rest api in the language of our choice.

  2. Hi William,
    thank you very much for this post! I’m using the powercli with mit Mac OS since I read this.
    I only got one problem. After the last docker pull I got often following error “An error occurred while sending the request.”.
    First I thought that this is a problem with the ssl certificate but I ignore all messages with “Set-PowerCLIConfiguration -InvalidCertificateAction Ignore”.
    Can you help me?

  3. very cool. now to learn enough about PowerCLI so I can automate ignoring certs and connecting to a server

  4. For those wondering, OK I have a powershell cli running, how do I do something useful like write a script: The pwsh is running in Photon, so type sh and you will get a shell. Then you can do all the unix stuff you need to do like install vim, etc. Exit the shell and voila, you have vim in your pwsh. Be sure to commit your customized docker image when you’re done customizing….

Thanks for the comment!

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