The following script is based on Eric Sloof‘s Resourcepool calculator.

I modified it quit a bit. It now has, logging, can be run as a scheduled task, % of resource reservation for memory and cpu that can be set on a resourcepool. The script respects the reservertion set on a particular vm.

You need to adjust the following variables:

#SCRIPTVARIABLES
$MEMRES = 30 # %OF MEMORY USED FOR RESERVATION
$CPURES = 15 # %OF CPU USED FOR RESERVATION
$HOSTCPUMHZ = 2931 # AMOUNT OF MHZ PER CPU/CORE ON THE ESX HOST
$VCSERVER = “localhost”
$ARCHDAYS = 7
$LOGFOLDER = “c:\ViLOG” #LOG DIRECTORY
$LFILEOBJ = “respool-*”

The script can be downloaded at the following site:

https://communities.vmware.com/docs/DOC-9610