After being asked a question around copying Roles and Privileges from one vCenter to another vCenter, I looked over many different PowerCLI scripts to perform the task with many the providing steps but never really appearing to take the process to the level that I wanted and for my customer.
I considered creating my own script to get to the level that I wanted but then I stumbled across the following post by Shane Marsh
This script takes the option of providing a role from a source vCenter and applying that role to multiple destination vCenters. There is also a capability to perform some permissions work, which I believe could be to add an account to a particular folder on the destination vCenters utilising the role that has just been created. It also looks like it wouldn’t take too much to go through and enhance the script further to handle multiple roles from the source vCenter.
I’ve gone through and tested the script in my lab environment and it works well… all credit to Shane for the work that he has done. As always, please make sure that you test any scripts in your own test environment before applying them to a production environment. Scripts are provided as is, and therefore there is no liability on the script writer for any damage or data loss incurred by running any of the scripts.