Using PowerCLI to dump your permission structure in vCenter

January 30th, 2014
by Christopher Kusek (PKGuild)

So there I was pondering the question, “How can I pull the details of the Permission tab in vCenter without logging into all of my damn vCenters!”

I tossed around a few ideas of commands which didn’t give me what I wanted. I searched and found some really awesome scripts by @LucD22 and others which were awesome if I wanted to view the rights assigned to roles, assign rights to those roles, and import them respectively.  But my objective was far more simpler than that.   I wanted a very easy way to dump what Role is tied to which User accounts across my hundreds of vCenters in a simple fashion.

Lo and behold, here is the base result!

Get-VIPermission | Select Role, Principal, Entity, UID

Wow that was easy! but wait! WTF WHY DOES UID KEEP TRUNCATING! Hey, calm down, calm down… I have a fix for that. ;)   Also in that same fix, I really cared specifically who was granted the Administrative type roles, less so caring about Virtual Machine User, or Power User.  Thus the following two modifications took care of that.

Get-VIPermission | Where {$_.Role –eq “Admin”} | Select Role, Principal, Entity, UID | Export-CSV “C:\Temp\Rights.csv”

And there it went! Dumping all of the data I wanted into a CSV file which I could sort and manipulate unflustered and unfettered by the results!

What was really useful about this, is unlike just looking at the top level permissions tab, this will also drill down into sub-objects whereby I was able to find accts which were granted permission on a sub-part!   Hopefully this helps you as much as it helped me in discovering and respectively writing this :)

I’ll probably come back and revisit this script on a quarterly basis making sure no-one went rogue in the meantime. You should too. :)

Tags: , ,
Posted in PowerCLI, Virtualization, vmware | Comments (117)

  • e health cigarette

    liquid solder Christopher Kusek, Technology Evangelist » Using PowerCLI to dump your permission structure in vCenter

  • dresslikeglee




  • Del Russel

    You may unquestionably see your experience within the do the job you create. The entire world hopes for even more passionate writers for example you who’re not afraid to mention how they think. All the time follow your heart.

  • Valentin Johanning

    Hello there, just became alert to your blog by way of Google, and uncovered that it truly is genuinely informative. I am gonna observe out for brussels. I will value for those who continue this in potential. Several men and women is going to be benefited from the creating. Cheers!

  • Pingback: solar panels for home()

  • Pingback: my pc back up()



  • Pingback: How to recover deleted text messages on iPhone()

  • Tyson F. Gautreaux

    Apple now has Rhapsody as an app, which is a great start, but it is currently hampered by the inability to store locally on your iPod, and has a dismal 64kbps bit rate. If this changes, then it will somewhat negate this advantage for the Zune, but the 10 songs per month will still be a big plus in Zune Pass’ favor.


    The background image of my website is labeled for commercial reuse. However, I need to copyright all other content (since I do not own the image), how do I go about doing so? Just to label my website as copyrighted… I am not concerned with the entire copyrighting process… All help is greatly appreciated..

  • Darline Jago

    You may surely see your expertise in the work you write. The planet hopes for much more passionate writers including you that are not afraid to mention how they feel. On a regular basis stick to your heart.

  • Go Here

    This is merely not onlly considered one of your accounts i’ve search, and there is a constant end in order to surprise me personally. Warm take care, and my spouse and I also wait for browsing inside future.

  • adonis golden ratio

    what is the best free website to start a successful blogg?

  • Extra Resources

    This is the penalize journal for anyone who wants to essay out out nearly this content. You notice so overmuch its virtually exhausting to converse with you (not that I real would want…haha). You definitely put a new extend on a issue thats been holographic almost for geezerhood. Metropolis matter, just uppercase!



  • Pingback: Diablo 3 Gold()

  • Archives