CraigV75
Enthusiast
Enthusiast

Script to pull ESXi host performance daily

Hi Guys,

I am looking to automate the reporting on multiple ESXi hosts. Luckily we only have 2 vCenter servers in the mix (busy transitioning to a new vCenter server).

What I'd like to know is 2-fold:

  1. What script can I use to log into these 2 vCenter servers and pull usage stats for the following:
    1. CPU Usage (%)
    2. RAM Usage (%)
    3. Datastore (Allocated, Used, Free)
  2. What script can I use to log onto a handful of stand-alone hosts to pull the same information.

I am a Powershell/PowerCLI noob, so I'll need a bit of hand-holding on this one to get it done right.

Thanks!

Tags (2)
0 Kudos
1 Reply
dbalcaraz
Expert
Expert

Hi,


Here is a full script about gathering information about ESXi hosts:

https://www.virtualdennis.com/using-powershell-to-gather-quick-and-easy-esxi-host-level-performance-...

You can grab some ideas from this script:

Get-VMHost | Select HostName, MemoryInstalled, MemoryAllocated, MemoryConsumed, MemoryUsage, CPUMax, CPUAvg, CPUMin

PowerCLI Basics: Powercli Basics Part 1 – Virtual Me

-------------------------------------------------------- "I greet each challenge with expectation"
0 Kudos