HOWTO – Create vRealize Automation User Role in vCenter using PowerCLI

I thought I would share a quick script to create a vCenter User Role with all the appropriate permissions for use with vRealize Automation (6.x or 7.x).

The script creates a new User Role within vCenter called vRealize Automation User.
Note: if you don’t like the name you can change the $role property to anything you like.

The script prompts for following information:

  • vCenter Server FQDN
  • the vCenter/SSO User with rights to create the role
  • the vCenter/SSO User password
  • the vRealize Automation Service account (that you want to assign to the permission)

And then automagically creates the new vCenter role with the required privileges and assigns permissions to the vRealize Automation service account from the root of the vCenter Server and propagates down.

Why script this single seemingly simple task? Well – I complete a lot of installations of vRealize Automation and it can be time consuming to create this vCenter Role every time! When you’re going to do it more than once, automation and orchestration are your friends!

The Script

Happy Scripting!

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.