Automation

 View Only
  • 1.  Get-Module -ListAvailable PowerCLI* | Import-Module failed

    Posted May 03, 2017 09:32 AM

    I installed powercli-core on macos sierra and run command as above, but it failed with errors:

    PS /Users/umarzuki/.local/share/powershell/Modules> Get-Module -ListAvailable PowerCLI* | Import-Module                                                   

    Import-Module : The required module 'PowerCLI.ViCore' is not loaded. Load the m

    odule or remove the module from 'RequiredModules' in the file '/Users/umarzuki/

    .local/share/powershell/Modules/PowerCLI.Cis/PowerCLI.Cis.psd1'.

    At line:1 char:39

    + Get-Module -ListAvailable PowerCLI* | Import-Module

    +                                   ~~~~~~~~~~~~~
    + CategoryInfo      : ResourceUnavailable: (/Users/umarzuki...werCLI.C

       is.psd1:String) [Import-Module], MissingMemberException

    + FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Com

       mands.ImportModuleCommand

    Import-Module : The required module 'PowerCLI.ViCore' is not loaded. Load the m

    odule or remove the module from 'RequiredModules' in the file '/Users/umarzuki/

    .local/share/powershell/Modules/PowerCLI.Vds/PowerCLI.Vds.psd1'.

    At line:1 char:39

    + Get-Module -ListAvailable PowerCLI* | Import-Module

    +                                   ~~~~~~~~~~~~~
    + CategoryInfo      : ResourceUnavailable: (/Users/umarzuki...werCLI.V

       ds.psd1:String) [Import-Module], MissingMemberException

    + FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Com

       mands.ImportModuleCommand

    PS /Users/umarzuki/.local/share/powershell/Modules> ls -l                 

    total 115272

    drwxr-xr-x@ 48 umarzuki  staff  1632 Apr 19 02:00 PowerCLI.Cis

    -rwxr-xr-x@  1 umarzuki  staff   2306885 Apr 10 21:47 PowerCLI.Cis.zip

    drwxr-xr-x@  9 umarzuki  staff   306 May  3 17:16 PowerCLI.Vds
    -rwxr-xr-x@  1 umarzuki  staff868065 Apr 10 21:47 PowerCLI.Vds.zip

    -rwxr-xr-x@  1 umarzuki  staff  55804303 Apr 10 21:46 PowerCLI.ViCore.zip

    -rwxr-xr-x@  1 umarzuki  staff 11516 Apr 19 01:49 README.md
    -rwxr-xr-x@  1 umarzuki  staff  1981 Apr 10 21:39 Start-PowerCLI.ps1
    drwxrwxr-x@ 10 umarzuki  staff   340 Apr 19 02:22 __MACOSX
    -rwxr-xr-x@  1 umarzuki  staff 13006 Apr 10 21:39 open_source_license.txt


  • 2.  RE: Get-Module -ListAvailable PowerCLI* | Import-Module failed
    Best Answer

    Posted May 03, 2017 02:34 PM

    You did follow the installation instructions for MacOs ?



  • 3.  RE: Get-Module -ListAvailable PowerCLI* | Import-Module failed

    Posted May 06, 2017 03:39 PM

    cd Downloads/

    ls PowerCLI_Core

    cd PowerCLI_Core

    unzip PowerCLI.ViCore.zip -d ~/.local/share/powershell/Modules

    unzip PowerCLI.Cis.zip -d ~/.local/share/powershell/Modules

    unzip PowerCLI.Cis.zip -d ~/.local/share/powershell/Modules

    unzip PowerCLI.Vds.zip -d ~/.local/share/powershell/Modules

    powershell

    Get-Module -ListAvailable PowerCLI* | Import-Module 

    Set-PowerCLIConfiguration -InvalidCertificateAction Ignore

    above are exact commands used.



  • 4.  RE: Get-Module -ListAvailable PowerCLI* | Import-Module failed

    Posted May 08, 2017 05:01 AM

    Did you do step 1 and step 2 (PowerShell Core with openssl and curl) from the instructions?