PowerCLI

 View Only
Expand all | Collapse all

powercli:exception has been thrown by the target of an invocation

  • 1.  powercli:exception has been thrown by the target of an invocation

    Posted Jul 22, 2019 05:28 AM

    Hi Luc,

    got following error while getting vmlist from cluster

    can you please suggest something on above .



  • 2.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jul 22, 2019 06:28 AM

    Can you try Get-Cluster <Clustername> | get-vm



  • 3.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jul 22, 2019 08:46 AM

    thnaksfor replying but this also does not work.



  • 4.  RE: powercli:exception has been thrown by the target of an invocation
    Best Answer

    Posted Jul 22, 2019 08:56 AM

    When you leave out the Location parameter, are the VMs on that cluster returned?

    This looks similar to the issue in Get-VM Exception has been thrown by the target of an invocation.

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

    Was it helpful? Let us know by completing this short survey here.



  • 5.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jul 23, 2019 04:19 AM

    tx ,i am checking this .



  • 6.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jul 24, 2019 08:27 AM

    i checked on different vmwhere powercli 11.2 was installed .and i dont get this error now .

    thnaks for this.



  • 7.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jan 26, 2022 11:55 AM

    I am also facing the same issue. Get-vm is working fine for other vms created by cloning from the base machine. If i create a vm by template then it is not working. What could be the reason for this ?



  • 8.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jan 26, 2022 11:59 AM

    Did you try completely removing PowerCLI and reinstalling it?



  • 9.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jan 26, 2022 12:00 PM

    mine is a new system and i recently installed powercli 6.5



  • 10.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jan 26, 2022 12:02 PM

    Any reason why you using this old version 6.5?



  • 11.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jan 26, 2022 04:50 PM

    i removed 6.5 and installed 12.3 version.

    Now Get-vm is working fine. But new-vm retuns some permission issue which was working fine with 6.5

    new-vm : 26/01/2022 16:21:29 New-VM Permission to perform this operation was denied. Required privilege 'System.Read'

     



  • 12.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jan 26, 2022 06:38 PM

    That is hidden permission which everyone needs to access the vCenter hierarchy.



  • 13.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Aug 25, 2023 03:22 PM

    Hi LuCD, 

    am facing same issue. But, this is not happening to most of the ESXi, only to perticular ESXi host's VMs list iam not able to pull.

    is there something related to port or any restriction to get the data? 

    Get-VM Exception has been thrown by the target of an
    invocation.



  • 14.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jul 22, 2019 06:29 AM

    Do you also get the same exception when you

    Get-VM -Location $cluster



  • 15.  RE: powercli:exception has been thrown by the target of an invocation

    Posted Jul 22, 2019 08:46 AM

    yes it gave me same result .