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?
You will need to provide a bit more info.
How and from where do you run the script?
Are you connected to a vCenter?
Which PowerCLI version are you using?
A screenshot of the first few lines of a run you did would alreayd help.Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
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?
1 person found this helpful
Brilliant - thanks for the effort you have put in - this is a task faced by may sysadmins alike, so just thank you for saving time!
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.
we need v2.1 script. the link is still pointing to v2.0.
secondly it is not working with vcenter appliance 6.5
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 ?
Link is not working, could you please share the code/working URL.