VMware vSphere

 View Only
Expand all | Collapse all

PowerCLI on linux generates error on Import

  • 1.  PowerCLI on linux generates error on Import

    Posted Jul 16, 2019 04:00 PM

    I have seen sample scripts online that include "Install-Module VMware.PowerCLI" as a step in a script that might automate certain ESXi/vSphere tasks, and I have seen others that talk about Installing and then doing "Import-Module  -Name VMware.PowerCLI".  I'm wondering whether import is simply a dated, unnecessary concept, since things seem to work fine with Install but throw an exception on Import:

    Import-Module -name VMware.PowerCLI                           

    Import-Module : VMware.VimAutomation.License module is not currently supported on the Core edition of PowerShell.

    At line:1 char:1

    + Import-Module -name VMware.PowerCLI

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (VMware.VimAutomatio\u2026tion of PowerShell.:String) [Import-Module], RuntimeException

    + FullyQualifiedErrorId : VMware.VimAutomation.License module is not currently supported on the Core edition of PowerShell.,Microsoft.PowerShell.Commands.ImportModuleCommand

    Searching for that complaint, I saw two instances, one in the code where it's thrown, and one here: https://cloudhat.eu/powercli-11-1-0-linux/

    This described the same complaint, and suggested a fix to modifying a manifest, except it seemed to match a different format (I only saw VimAutomation in an XML).

    So, two questions:

    1. Should I even care about Import-Module?
    2. If I do, what's the best way to fix the problem with the license?

    This seems to be a problem in 11.3.0.13990089 at least. 

    Thanks.



  • 2.  RE: PowerCLI on linux generates error on Import

    Posted Jul 17, 2019 01:08 AM

    Move to PowerCLI.