VMware Cloud Community
logiboy123
Expert
Expert

Resource Pools Custom Shares Automation

I wanted to find a way to automatically adjust the custom shares settings on Resource Pools within an environment I'm currently in the design stage for.

I found the following script which looks pretty good;

http://blog.cnidus.net/2010/12/21/custom-shares-on-a-resource-pool-scripted-modified/

This is a modified version of Andrew Mitchell's original script from 2009. One of the reasons I really like this version is that I can set the script to run recursively against all clusters.

Question one is if anyone knows if there is an even more up to date or better version?

Second question; what is the point of this component in the script "$CredsLocation = "c:\tmp\Weighted_Shares_Creds.txt". It seems to me if you record the credentials in a text file then that isn't much different from embedding the information directly in the script itself, or have I missed something?

My plan would be to create a service account with the bare minimum permissions required to adjust Resource Pool shares only. Then have the script run once a week. One script for each of the datacentres in our environment.

Any feedback would be greatly appreciated.

Regards,

Paul

Reply
0 Kudos
1 Reply
LucD
Leadership
Leadership

The credentials aren't stored in clear text in that file.

On the other hand that kind of encryption is not terribly secure either.

See Importing and Exporting Credentials in PowerShell

Using a dedicated service account is defintely more secure.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos