WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / PowerCLI Core is now available on Docker Hub!

PowerCLI Core is now available on Docker Hub!

10.19.2016 by William Lam // 8 Comments

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.

Asked for @PowerCLI Core to be hosted on @Docker Hub & the MAN (@alanrenouf)) delivers!

docker pull vmware/powerclicore pic.twitter.com/4VpoDZJNc9

— William Lam (@lamw) October 19, 2016

In addition to the three methods of consuming PowerCLI Core, you also now find it hosted on Docker Hub: https://hub.docker.com/r/vmware/powerclicore/

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

screen-shot-2016-10-19-at-10-52-00-pm
Step 2 - Run the PowerCLI Core Docker Container by running the following command:

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

screen-shot-2016-10-19-at-10-52-33-pm
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

More from my site

  • 5 ways to a run PowerCLI script using the PowerCLI Docker Container
  • VMware PowerCLI for Mac OS X, Linux & More? Yes, please!
  • How Wrecking Crew Inc. leveraged vSphere's Instant Clone to instantly provision hundreds of VMs
  • PowerCLI 13.0 on Photon OS
  • Heads Up - Unable to open VIB archive in streaming mode using Export-EsxImageProfile with PowerCLI 13.0

Categories // Automation, Docker, PowerCLI, Security Tags // Docker, PowerCLI

Comments

  1. Kevin Martin says

    10/20/2016 at 5:24 am

    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.

    Reply
    • William Lam says

      10/20/2016 at 7:39 am

      Kevin,

      Yes, we are! Please have a look at the VMworld Session Alan and I did at VMworld US for more details 🙂 http://vmware.mediasite.com/mediasite/Presentation/9b61593fdc5646d390be355097f7177744/f0b0e19defb64e008689a6fadf0266941d

      Reply
      • Kevin Martin says

        10/20/2016 at 10:03 am

        Awesome!! Love the direction VMware is going with this!!

        Reply
  2. Chris says

    10/28/2016 at 1:44 am

    Thank you very much vor this incredible good blog post =)

    Reply
  3. Chris says

    12/05/2016 at 2:09 am

    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?

    Reply
  4. Eric Young says

    01/04/2017 at 2:48 pm

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

    Reply
  5. wsanders says

    06/12/2018 at 9:04 am

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

    Reply
  6. gaz says

    01/02/2019 at 6:45 am

    Can you use SSO or CredentialStore yet please?

    Reply

Thanks for the comment! Cancel reply

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

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • Automated ESXi Installation with a USB Network Adapter using Kickstart 02/01/2023
  • How to bootstrap ESXi compute only node and connect to vSAN HCI Mesh? 01/31/2023
  • Quick Tip - Easily move or copy VMs between two Free ESXi hosts? 01/30/2023
  • vSphere with Tanzu using Intel Arc GPU 01/26/2023
  • Quick Tip - Automating allowed and not allowed Datastores for use with vSphere Cluster Services (vCLS) 01/25/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...