I’ve recently had a ton of requests for information about specific VMs. They want to know how many disks they have, CPU count, how much RAM, and which environment the VM resides in.

Instead of constantly searching vCenter, I wrote this quickly during the meeting to query multiple servers.

I hard-coded my vcenter hostname in there, so you’ll need to change that line

Usage is like this:

or

And expected output is like this:

Server Server1
OS is Red Hat Enterprise Linux 4 (32-bit)
Running on host esxihost1 in the cluster1 cluster in the vdatacentername Datacenter
It has 1 virtual disks, 1 CPUs, and 2 GB of RAM

Not real sophisticated, but works…