WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / How to install PowerCLI Core on Debian Linux?

How to install PowerCLI Core on Debian Linux?

01.04.2017 by William Lam // 6 Comments

PowerCLI Core has been tried on two Linux distributions: VMware's Photon OS and Ubuntu 14.04, however that is not to say it would not work on other distros. In fact, .Net Core (which PowerCLI Core consumes) supports a variety of Linux distributions which can be found here. I recently needed to run PowerCLI Core on a Debian 8 system which required a few minor tweaks to get working. I figure I might as well document the steps in case this might help others wanting to use PowerCLI Core which now includes PowerNSX on a Debian system.

Step 1 - Append the following repo source to /etc/apt/sources.list configuration file:

deb http://ftp.de.debian.org/debian sid main

Step 2 - Run the following command to update the repo

apt-get update

Step 3 - Download .deb package for latest Powershell release and run the following command which will generate list of required dependencies:

wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.14/powershell_6.0.0-alpha.14-1ubuntu1.16.04.1_amd64.deb
dpkg -i powershell_6.0.0-alpha.14-1ubuntu1.16.04.1_amd64.deb

Step 4 - Run the following command to install powershell along with its dependencies:

apt-get -f install

Step 5 - The next series of commands will download and setup PowerCLI Core:

mkdir -p /powershell
wget https://download3.vmware.com/software/vmw-tools/powerclicore/PowerCLI_Core.zip -O /powershell/PowerCLI.ViCore.zip
apt-get -y install unzip
unzip /powershell/PowerCLI.ViCore.zip -d /powershell
mkdir -p /root/.config/powershell/
mkdir -p ~/.local/share/powershell/Modules
unzip /powershell/PowerCLI.ViCore.zip -d ~/.local/share/powershell/Modules
unzip /powershell/PowerCLI.Vds.zip -d ~/.local/share/powershell/Modules
mv /powershell/Start-PowerCLI.ps1 /root/.config/powershell/Microsoft.PowerShell_profile.ps1

Step 6 (Optional) - Install PowerNSX module:

wget https://github.com/vmware/powernsx/archive/master.zip -O /powershell/master.zip
unzip /powershell/master.zip -d /powershell/
mkdir ~/.local/share/powershell/Modules/PowerNSX
cp /powershell/powernsx-master/PowerNSX.ps*1 ~/.local/share/powershell/Modules/PowerNSX/

If everything installed successfully, you should be able to now launch PowerCLI Core by simply typing "powershell"

More from my site

  • 'System.Management.Automation.ConfigPropertyAccessor' exception when launching PowerCLI Core in Linux firstboot script
  • VMware PowerCLI for Mac OS X, Linux & More? Yes, please!
  • Packer reference for building PhotonOS Virtual Appliance using OVF properties 
  • Automating HCX Multi-Site Service Mesh configuration using the new HCX PowerCLI cmdlets
  • Automating complete HCX deployment and configuration to first cloud migration using PowerCLI

Categories // Automation, PowerCLI Tags // debian, linux, PowerCLICore

Comments

  1. *protectedTim Manochehri says

    01/04/2017 at 3:18 pm

    Thanks for this! This is cool.... However:

    It appears that some cmdlets are not included I have PowerShell scripts for windows. And these work fine on a Windows host.

    I get this error when trying to login to an Esxi host.

    Get-VICredentialStoreItem : The term 'Get-VICredentialStoreItem' 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.

    Reply
    • William Lam says

      01/04/2017 at 4:25 pm

      Tim,

      Coupe of things. Not all PowerCLI cmdlets have been ported over, especially ones that have a reliance on Microsoft Powershell cmdlets such as Credential Store (this is already a known issue which we've published PowerCLI Core Fling page here https://labs.vmware.com/flings/powercli-core). .Net Core (Powershell for Linux) is currently only in Alpha milestone, which means there's still a lot of work on their end to finish the port before we can finish our port which will also take some time. If there are any other missing cmdlets that you think we should work on next, be sure to leave a note here or on the Fling page as I know the PM is actively looking for feedback as they prioritize cmdlet porting over to PowerCLI Core

      Reply
  2. *protectedjamac says

    01/04/2017 at 3:31 pm

    We need PowerCLI on enterprise Linuxes like RHEL, SLES, etc. !

    Reply
    • *protectedgreg perry says

      01/05/2017 at 10:47 am

      I have gotten it installed on Cent 7 with minor issues. As William says above not all cmdlets have been ported over, but the ones in the fling I have gotten working. The one problem I do have with Cent is that it does not come with a default Libcurl SSL and you will have to do a quirky workaround to accept unsigned certificates until powershell gets an update.

      Reply
      • *protectedhimanshu88blog says

        05/25/2017 at 11:02 pm

        Hi Can you please provide the steps how you got it working in cent os 7 and used which package to install.

        Reply
  3. *protected_nd34905723 says

    02/10/2017 at 12:58 pm

    Thanks for the quick-and-dirty install notes! On my Debian 8 Jessie, I could not install powershell_6.0.0-alpha.15-1ubuntu1.16.04.1_amd64.deb due to complaints about libicu55 but was able to install powershell_6.0.0-alpha.15-1ubuntu1.14.04.1_amd64.deb without issue.

    Reply

Thanks for the comment!Cancel reply

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

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

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 © 2025

 

Loading Comments...