PowerCLI – Copy Roles, Privileges and Permissions from One vCenter to Multiple vCenters

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.

About the Author


I'm a technical person who has held many IT related jobs for the past 20+ years. I am now working for VMware helping customers to maximise their investment in VMware technologies.

1 thought on “PowerCLI – Copy Roles, Privileges and Permissions from One vCenter to Multiple vCenters

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: