Automation

 View Only
  • 1.  PowerCli getting error

    Posted Jul 09, 2020 07:20 AM

    Command

    $Clusters = Get-Cluster -Name Name of the Cluster [This is working fine]

    $allNodes = $Clusters | Get-VMHost [This is working fine]

    $allVMs = $Clusters | Get-VM [This is not working and getting below error]

    Get-VM : 7/9/2020 9:55:42 AM    Get-VM          Exception has been thrown by the target of an invocation.

    At line:1 char:23

    + $allVMs = $Clusters | Get-VM

    +                       ~~~~~~

        + CategoryInfo          : NotSpecified: (:) [Get-VM], VimException

        + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM

    PowerCli Version: 6.5 Releae 1 build 4624819

    vCenter Version: 6.7.0

    Build No: 14792544

    ESXi: 6.7.0

    Build No: 15018017

    Kindly help me.

    Thanks



  • 2.  RE: PowerCli getting error

    Posted Jul 22, 2020 05:39 PM

    Hello,

    that  sounds like an issue with powercli itself

    i wouldn't use the PowerCli Version: 6.5 Releae 1 build 4624819 with higher Vmware Versions.

    VMware Product Interoperability Matrices        (Version seems not supported)

    i have this one in use   PowerShell Gallery | VMware.PowerCLI 12.0.0.15947286

    i don't have any issue with it.   May good you upgrade and see how it goes :smileywink:

    Best regards

    Max



  • 3.  RE: PowerCli getting error

    Posted Jul 22, 2020 06:13 PM

    Moderator: Thread moved to the PowerCLI area.