Thanks to the official releases of PowerShell 6 Core and PowerCLI 10.0, you can easily run PowerCLI in a Docker Container. Some days ago, the PowerCLICore Docker image has been updated with all the latest packages. In this post, I will describe how to run PowerCLI in a Docker Container on Windows 10.
Let’s start by pulling the image from Docker Hub:
1 |
docker pull vmware/powerclicore |
I can confirm that the PowerCLI image exists:
Ok, now I can create a Container based on this image:
1 |
docker run -it vmware/powerclicore |
The container is up and running. I can check the OS version:
1 |
cat /etc/*-release |
The container is based on VMware Photon OS:
I can confirm the PowerCLI module version:
Now you can connect to your Vcenter.
Thanks for reading! You can follow me on Twitter @PrigentNico