How to Install and Use PowerCLI from Linux.
Disclaimer:
Don't expect to find all the commands typically found in the Windows counterpart.
Good luck finding autodeploy, imagebuilder and vum commands.1. From a Linux system (Ubuntu in my case), launch your browser and to to labs.vmware.com.
2. Find PowerCLI Core and download it. In the process, download the Instructions.pdf.
3. Download PowerShell for Linux using the curl command.
# curl -SLO https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.12/powershell_6.0.0.-alpha.12-11ubuntu1.14.04.1_amd64.deb
4. Install the package by force using the dpkg command.
# sudo dpkg -i powershell*.deb
# sudo apt-get install -f
5. Verify the package is install with the dpkg -l command
6. Create the Modules directory for PowerCLI
# mkdir -p ~/.local/share/powershell/Modules
7. Copy the PowerCLI file and extract it.
# cp PowerCLI_Core* ~/local/share/powershell/Modules
8. Extract the zip files, including PowerCLI.ViCore and PowerCLI.Vds. Verify the contents.
# cd ~/local/share/powershell/Modules
# unzip PowerCLI.ViCore.zip
# unzip PowerCLI.Vds.zip
9. Launch powershell
10. Import the PowerCLI Modules
11. Verify the are loaded
12. Instruct powercli to ignore invalid certificates and use it.
Some useful links:
http://www.virtuallyghetto.com/2016/09/vmware-powercli-for-mac-os-x-linux-more-yes-please.html
https://www.vmguru.com/2016/10/powercli-os-x-linux-fling/