PowerCLI

 View Only
  • 1.  Get-Stat for Power Usage of the ESXi Server

    Posted Aug 12, 2014 01:34 AM

    Hi All

    Need your help in getting a script to capture the power consumption/usage of an esxi host. I checked the get-stat command, I don't see any special argument as power usage to check for the host entity. The time interval can be anything, i would like to see the same values that are showing under for power under the performance charts of an esxi host.

    Any quick help would be appreciated.

    Thanks in advance



  • 2.  RE: Get-Stat for Power Usage of the ESXi Server
    Best Answer

    Posted Aug 12, 2014 05:53 AM

    Try like this

    001
    002
    003
    004
    005

    $entity = Get-VMHost -Name MyEsx
    $stat = "power.power.average"

    Get-Stat -Entity $entity -Stat $stat -Realtime -MaxSamples 1
     



  • 3.  RE: Get-Stat for Power Usage of the ESXi Server

    Posted Aug 12, 2014 06:24 AM

    That worked !  Thought no parameters for power stats. Should have check the Get-StatType :smileysad:

    Thanks LucD