After recent discussion on vSphere Capacity planning, I thought I would share one of the tools I use for this purpose. This is a side project I've been working on for few months.
I present to you, my very own "VMware Capacity & Performance Report PowerCLI script (v2.1 Community edition)"
(Click here then click on "Download")
This is a complex PowerCLI script I wrote, that generates an e-mail report that gives you insight into the current state of your VMware vSphere environment's capacity. It generates tables, pie charts and line charts with information about CPU, Memory & Storage capacity, VM Provisioning Potential, Cluster Resilience and more. Check the script's #INFORMATION block for more information about prerequisites, script input and output.
Have a look at the report it generates and let me know what you think of it!
Please share your thoughts and comments!
Edited on May 25 : Changed OneDrive link to updated script v2.1 with bugfix (for cluster names with a space in it)
First of all thanks,This Script is awesome.It was working well till few days back but now it is not showing any value in the Monthly Average CPU Usage %,thus graphs is also empty.
I checked all things but in vain.
Same is with Monthly Average Memory Usage% but Datastore capacity report is showing fine in tabular as well as in graphs.
I am unable to connect to Vcenter. When i run this script i am getting report in the mail but without any data. Can you please help me. Suddenly facing this issue.
It will do that if you haven't loaded the PowerCLI modules in your session. I think this script is older and uses the old method of loading them so you'll need to run this before the script or put it at the top:
Or just run it from the PowerCLI shortcut that's on your desktop after installing powercli (it loads them automatically). Also make sure you are running this on a system where you have installed powercli.
This script is able to capture data on the Linux, Unix and Windows OS details. How about to capture for the CentOS,Oracle, Applicance servers etc,
Also, I want to include the license details on utilized/Available license of the VM in the Vcenter in the output file. And, if possible cluster commitment.Over commitment details also looking forward
Thanks in advance
Great Script for VMware and VSphere reporting. As we use not only VMware, but also Hyper-V in our environment.
I was wondering if anyone had tried to do take the same script to use in Hyper-V for reporting cluster and VM stats?
Thanks for this script. I am new to both vmware and scripting. Getting the below error for CPU, memory and all stats gathering. Can you please help?
Cannot convert value "<td>" to type "System.Int32". Error: "Input string was
not in a correct format."
At C:\Users\kkannan1_l4\Desktop\check1.ps1:492 char:3
+ + "<td>" + (GetDatastoreAllocationPercentage $_) + "% </tr>"
+ CategoryInfo : InvalidArgument: (:) , RuntimeException
+ FullyQualifiedErrorId : InvalidCastFromStringToInteger
Almost at all data collection lines. Moreover, can you tell me how long the script takes complete the entire procedure?
I recently updated to PowerCLI v. 6.5 and not the script won't work. I have imported the VMWare.VimAutomation.Core module, but I keep getting errors and empty reports. Has anyone used the script successfully using PowerCLI v6.5?
This is a bit older of a thread but I figured I would throw my 2 cents in.
What I ended up doing is creating a new VIProperty on the Cluster object that did all of this and presented it as part of the Cluster object, so I could do a Get-Cluster and have the capacity info there, updated in real-time, whenever I wanted it. This is handy to check capacity before deploying a new VM. Now this does add a couple of seconds to large clusters, but my 61 host cluster takes about 2 seconds to gather all the information required.
The other reason I do this is because we use a custom algorithm to calculate capacity, and having it built in this way and always available helps to have the data available whenever we need it.
Is possible to add to this report also section with Datastore Cluster Capacity Report (output from Get-DatastoreCluster) with same columns as have Datastore Capacity Report?
Script has been working fine for me for years now, however oddly after some Infrastructure refresh changes we have 2 new Clusters (PR/DR) when running the report on the PR side everything still perfect but when running the script on the DR side it keeps reporting on both Clusters, Hosts Data-stores etc all in the 1 report even though I am only specifying the DR VCenter name in the report, I take it there is a permission or something somewhere on the DR side that is making the report look at both clusters but does anyone know where to check or how i can get the report just reporting on the 1 vcenter like it does for the PR ?