Now that you have the shares fully automated and scheduled, you might need to report the values and ensure that everything is good. Since your shares are defined by the number of VMs and the custom attribute value, you can easily create a table-formatted report that includes the set values for memory and CPU shares and compare that against a computed value. This will help you to verify that your function is working in the future. For this recipe, you will write an additional function to add into your module.
This recipe will continue inside the .psm1
file that you created in the previous recipe. You will need this file, a text editor, a PowerCLI window, and an active connection to vCenter.