I'm working on a fairly comprehensive capacity script (i think)that reports by "cluster" and writes the results into a MS SQL database
What i'm trying to do is show the count of new created vm's and count for deleted vm's by cluster.
Attached is script i'm using, any recommendations will be welcomed. The current script completes without errors but it seems that the count isn't cluster based as per the rest of the items.
If you pipe your $clus variable to the Get-VIEvent in your $vmnewcount and $vmdelcount lines (56 and 57) this should limit the VI Events to the cluster. The way it is currently written you might get all VI Events for the vCenter.
$vmnewcount = ($clus | get-VIEvent...)
Let me know if this helps.