VMware Cloud Community
neoad
Contributor
Contributor

get-esxcli using powercli


Hi team,

I am trying to gather the hpacucli information using get-esxcli

  • Connecting Directly to ESXi Host in PowerCLI with root credentials
  • $esxcli = Get-VMHost | Get-EsxCli
  • $esxcli.hpacucli.cmd("controller all show status")

Unable to cast object of type 'System.String' to type 'System.Collections.Gener

ic.Dictionary`2[System.String,System.Object]'.

At line:1 char:21

+ $esxcli.hpacucli.cmd <<<< ("$command")

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

    + FullyQualifiedErrorId : MethodInvocationException

Not sure where i am doing wrong. Please help me.

Reply
0 Kudos
4 Replies
peetz
Leadership
Leadership

This works for me.

Can  you please post

- the ESXi version -> (get-vmhost).version

- the PowerCLI version -> Get-PowerCLIVersion

Twitter: @VFrontDe, @ESXiPatches | https://esxi-patches.v-front.de | https://vibsdepot.v-front.de
Reply
0 Kudos
neoad
Contributor
Contributor

(get-vmhost).version

5.0.0

PowerCLI Version

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

   VMware vSphere PowerCLI 5.1 Release 2 build 1012425

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

Snapin Versions

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

   VMWare AutoDeploy PowerCLI Component 5.1 build 768137

   VMWare ImageBuilder PowerCLI Component 5.1 build 768137

   VMware License PowerCLI Component 5.1 build 669840

   VMware VDS PowerCLI Component 5.1 build 1012428

   VMware vSphere PowerCLI Component 5.1 build 1012428

Reply
0 Kudos
neoad
Contributor
Contributor

Its working with the new verions. Belive its bug in 5.1

Working in the below verions.

PowerCLI Version

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

   VMware vSphere PowerCLI 5.5 Release 2 build 1671586

Reply
0 Kudos
Borja_Mari
Virtuoso
Virtuoso

Hello,

if you try this, doesn't work?:

$esxcli = Get-EsxCli -VMhost IP/name_of_esxi_host

$esxcli

Best regards,

Pablo

------------------------------------------------------------------------------------------------- PLEASE CONSIDER AWARDING any HELPFUL or CORRECT reply. Thanks!! Por favor CONSIDERA PREMIAR cualquier respuesta ÚTIL o CORRECTA . ¡¡Muchas gracias!! VCP3, VCP4, VCP5-DCV (VCP550), vExpert 2010, 2014 BLOG: http://communities.vmware.com/blogs/VirtuallyAnITNoob
Reply
0 Kudos