1 Reply Latest reply on Apr 17, 2019 8:37 AM by LucD

    Hardware version 14 will not run Get-VIEvent

    AlexP012 Lurker



      I'm running Vcenter 6.7 and I'm running some powerCLI version on powershell 5.1.


      When I run


      Get-VIEvent -Entity Servername


      it works if the server has a hardware version of 10 but if it has a version of 14 I get.


      Get-VIEvent : 17/04/2019 15:13:20       Get-VIEvent             Exception has been thrown by the target of an invocation.

      At line:1 char:1

      + Get-VIEvent -Entity gold_1

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

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

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


      Any Ideas?



        • 1. Re: Hardware version 14 will not run Get-VIEvent
          LucD Guru
          vExpertCommunity WarriorsUser Moderators

          Seems to work fine for me.


          $vmName = 'MyVM'

          $vm = Get-VM -Name $vmName

          $events = Get-VIEvent -Entity $vm -MaxSamples ([int]::MaxValue)

          $vm | Select Version,@{N='Events';E={$events.Count}},


             @{N='PCLI';E={(Get-Module -Name VMware.PowerCLI -ListAvailable | Sort-Object -Property Version | Select -last 1).Version}}




          Which platform and which PS version are you using?