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 (118)

  • http://herminskitchen.com/e-liquid/how-to-make-a-paper-cigarette-from-cigarette-foil.asp e health cigarette

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

  • http://dresslikeglee.com dresslikeglee

    ???????

  • http://saraskosherfood.com saraskosherfood.com

    ???????????????????????

  • http://www.1234a.com 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.

  • http://www.1234a.com 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()

  • http://www.metafuzz.com www.metafuzz.com

    ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????“???”?????????????????????????????????????????“???”???????????????????????????????????“???”????????????????B?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????“B????”??????????????????????B???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????……???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????“???”????????????????????????????????????????????????????????????????????????????????????????????????????“??”???????????????????????????????????????????????????????????????????????????????????“??????”??100???????????????????????????????????????????????????????????????????????????100?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

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

  • http://www.sfalerytu.mielno.pl 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.

  • http://www.ebainet.com/venus.php http://www.ebainet.com/venus.php

    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..

  • http://www.1234aa.com 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.

  • http://badcreditautomotive.blogspot.com 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.

  • http://www.fanpop.com/fans/JohnBarbana adonis golden ratio

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

  • http://badcreditautomotive.blogspot.com 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!

  • http://www.gelbermobilenotary.com www.gelbermobilenotary.com

    ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

  • http://www.pakarinternetmarketing.com www.pakarinternetmarketing.com

    ??, ?, ??? ???????

  • Pingback: Diablo 3 Gold()

  • Archives