2 Replies Latest reply on Nov 9, 2017 8:44 PM by RyanDouglas

    trouble running Power NSX / PowerCLI on my MAC OS

    RyanDouglas Lurker
    VMware Employees

      Hi guys,

       

       

      I am having trouble running Power NSX / PowerCLI on my mac.

      I have appropriate versions, but keep getting these error messages.

       

       

      Any ideas?

       

       

       

       

      PS /Users/rdouglas> Connect-VIServer -server 192.168.10.10 -user administrator@vsphere.local

      Connect-VIServer : The 'Connect-VIServer' command was found in the module 'VMware.VimAutomation.Core', but the module could

      not be loaded. For more information, run 'Import-Module VMware.VimAutomation.Core'.

      At line:1 char:1

      + Connect-VIServer -server 192.168.10.10 -user administrator@vsphere.lo ...

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

          + CategoryInfo          : ObjectNotFound: (Connect-VIServer:String) [], CommandNotFoundException

          + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

       

       

      PS /Users/rdouglas> Get-PSVersion

       

       

      Major Minor Patch Label

      ----- ----- ----- -----

          6     0     0 alpha

       

       

       

       

      PS /Users/rdouglas> Find-Module | Where{$_.Name -like "*PowerCLI*"}

       

       

      Version    Name                                Repository           Description

      -------    ----                                ----------           -----------

      6.5.3.6... VMware.PowerCLI                     PSGallery            This Windows PowerShell module contains VMware.PowerCLI

      1.0        DSC_PowerCLISnapShotCheck           PSGallery            This PowerCLI DSC Resource will check’s for configurat...

      1.0.1      PowerCLITools                       PSGallery            PowerCLI Tools

      1.0        PowerClippy                         PSGallery            Bringing back our friend Clippy, through the magic of ...

      1.0        PowerCLI.SessionManager             PSGallery            Manage VMware sessions

      0.4.2      Veeam.PowerCLI-Interactions         PSGallery            This PowerShell Module enables you to interact via VMw...

       

       

       

       

      PS /Users/rdouglas> Find-Module | Where{$_.Name -like "*NSX*"}

       

       

      Version    Name                                Repository           Description

      -------    ----                                ----------           -----------

      2.0.0.6... VMware.VimAutomation.Nsxt           PSGallery            This Windows PowerShell module contains PowerCLI NSXT ...

      3.0.1054   PowerNSX                            PSGallery            PowerNSX is a PowerShell module that abstracts the VMw...

      3.0.1235   TestNBPNSX                          PSGallery            PowerNSX is a PowerShell module that abstracts the VMw...

        • 1. Re: trouble running Power NSX / PowerCLI on my MAC OS
          LucD Guru
          vExpertUser ModeratorsCommunity Warriors

          The Find-Module cmdlet searches on the PowerShell Gallery, not on your Mac.

          Those will not run on PowerShell Core afaik.

          Did you follow the installation instructions?

          Can you do a "Get-Module" and a "Get-Module -ListAvailable"?

          And what happens when you do the Import-Module as the message suggests?

          What is in the variable $PSModulePath?

          • 2. Re: trouble running Power NSX / PowerCLI on my MAC OS
            RyanDouglas Lurker
            VMware Employees

            Thanks for replying! Yes I did follow those instructions page to the letter.

            Below is the requested info:

             

             

            PS /Users/rdouglas> Get-Module                                                                                                                                                                                            ModuleType Version    Name                                ExportedCommands                                   ---------- -------    ----                                ----------------                                   Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-...

            Script     1.2        PSReadLine                          {Get-PSReadlineKeyHandler, Get-PSReadlineOption...

             

             

             

             

            PS /Users/rdouglas> Get-Module -ListAvailable

             

             

             

             

                Directory: /Users/rdouglas/.local/share/powershell/Modules

             

             

             

             

            ModuleType Version    Name                                ExportedCommands

            ---------- -------    ----                                ----------------

            Binary     6.0.0.0    PowerCLI.Cis

            Binary     1.21       PowerCLI.Vds

            Binary     1.21       PowerCLI.ViCore                     HookGetViewAutoCompleter

            Script     3.0.1054   PowerNSX                            {Add-XmlElement, Format-Xml, Invoke-NsxRestMeth...

            Script     3.0.1054   PowerNSX                            {Add-XmlElement, Format-Xml, Invoke-NsxRestMeth...

            Binary     6.5.3.6... VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-C...

            Manifest   6.5.1.5... VMware.VimAutomation.Common

            Binary     6.5.2.6... VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysic...

            Manifest   1.0.0.5... VMware.VimAutomation.Sdk            {Get-PSVersion, Get-InstallPath}

            Binary     6.5.1.5... VMware.VimAutomation.Vds            {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwit...

             

             

             

             

                Directory: /usr/local/microsoft/powershell/6.0.0-alpha.18/Modules

             

             

             

             

            ModuleType Version    Name                                ExportedCommands

            ---------- -------    ----                                ----------------

            Manifest   1.1.0.0    Microsoft.PowerShell.Archive        {Compress-Archive, Expand-Archive}

            Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript, Stop-Transcript}

            Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty...

            Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Credential, Get-ExecutionPolicy, Set-Execu...

            Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Form...

            Script     1.1.2.0    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider...

            Script     3.3.9      Pester                              {Describe, Context, It, Should...}

            Script     1.1.2.0    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Upda...

            Script     0.0        PSDesiredStateConfiguration         {ThrowError, Get-PSMetaConfigDocumentInstVersio...

            Script     1.2        PSReadLine                          {Get-PSReadlineKeyHandler, Set-PSReadlineKeyHan...

             

             

             

             

             

             

            PS /Users/rdouglas> Import-Module VMware.VimAutomation.Core

            Import-Module : Could not compare "6.0.0-alpha" to "3.0". Error: "Cannot convert value "3.0" to type

            "System.Management.Automation.SemanticVersion". Error: "Cannot process argument because the value of

            argument "version" is not valid. Change the value of the "version" argument and run the operation again.""

            At line:1 char:1

            + Import-Module VMware.VimAutomation.Core

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

                + CategoryInfo          : InvalidOperation: (:) [Import-Module], RuntimeException

                + FullyQualifiedErrorId : ComparisonFailure,Microsoft.PowerShell.Commands.ImportModuleCommand

             

             

             

             

             

             

            PS /Users/rdouglas> Write-Host $PSModulePath

             

             

            PS /Users/rdouglas> Write-Host "xxxx: $PSModulePath"

            xxxx:

            PS /Users/rdouglas>