3 Replies Latest reply on May 17, 2019 9:57 PM by LucD

    Using the get-inventoryplus function getting error....

    COS Master

      vCenter Appliance version: 6.5 11347054

       

      PowerCLI version:

      VMware.Vim 6.7.0.10334489

      VMware.VimAutomation.Cis.Core 11.0.0.10335701

      VMware.VimAutomation.Common 11.0.0.10334497

      VMware.VimAutomation.Core 11.0.0.10336080

      VMware.VimAutomation.Sdk 11.0.0.10334495

       

       

      I've been using the below function...

      Get-InventoryPlus - Inventory of all vSphere objects - LucD notes

       

      Haven't used it in a few months but now I am getting the below bunch of errors...

       

      Cannot convert the "System.Object[]" value of type "System.Object[]" to type "VMware.Vim.ManagedEntity".

      At line:125 char:11

      +           $Object = Get-View -Id $Parent -Property Name,Parent

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

          + CategoryInfo          : InvalidArgument: (:) [], RuntimeException

          + FullyQualifiedErrorId : ConvertToFinalInvalidCastException

       

      Cannot convert the "System.Object[]" value of type "System.Object[]" to type "VMware.Vim.ManagedEntity".

      At line:125 char:11

      +           $Object = Get-View -Id $Parent -Property Name,Parent

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

          + CategoryInfo          : InvalidArgument: (:) [], RuntimeException

          + FullyQualifiedErrorId : ConvertToFinalInvalidCastException

       

       

      The errors go on and on.

       

      Any ideas on how to fix?