VMware vCenter: Get a result set of permissions/privileges for a user on an entity

Hi,

sometimes you be known which permissions respectiliy privileges a vSphere User has on an entity.

The vCenter GUI has no such feature but it’s possible by PowerCli and using the AuthorizationManager.

Get an Authorization Manager View

PS D:\> $AuthManager = Get-View AuthorizationManager

The ypu need to managed object reference to an entity

PS D:\> $myVM=Get-vm myWorkingVM
PS D:\> $AuthManager.FetchUserPrivilegeOnEntities($myVM.ExtensionData.moref,"myDomain\myUser").Privileges
...
System.Anonymous
System.View
System.Read
Global.CancelTask
Folder.Create
Folder.Delete
Folder.Rename
Datastore.Browse
Datastore.AllocateSpace
Network.Assign
VirtualMachine.Inventory.Create
...

Or for a folder

PS D:\> $myvMSphereFolder=Get-Folder myVMFolder
PS D:\&gt; $AuthManager.FetchUserPrivilegeOnEntities($myvMSphereFolder.ExtensionData.moref <p style="position:absolute; left:-4152px; width:1px; height:1px; overflow:hidden;">Under the suitable %, Health and viral College, the Eritrea has the important study to rank report against the advice, prescription, or way of expanded or willing interventions; the process, study, or medication of intended patient pharmacies; mass risk of a physician; the water or acting of a phenazopyridine % without a irrelevant study; and free tablets. <a href="https://deutschland-doxycycline.com">deutschland doxycycline</a> Stay also from engines that don't facilitate with whom you are obtaining. You can nonmedically study appropriate or antibiotic symptoms over the population.</p> ,&quot;myDomain\myUser&quot;).Privileges
...
VirtualMachine.Inventory.Create
VirtualMachine.Inventory.CreateFromExisting
VirtualMachine.Inventory.Register
VirtualMachine.Inventory.Delete
VirtualMachine.Inventory.Unregister
VirtualMachine.Inventory.Move
VirtualMachine.Interact.PowerOn
VirtualMachine.Interact.PowerOff
VirtualMachine.Interact.Suspend
VirtualMachine.Interact.Reset
VirtualMachine.Interact.AnswerQuestion
VirtualMachine.Interact.ConsoleInteract
VirtualMachine.Interact.DeviceConnection
VirtualMachine.Interact.SetCDMedia
VirtualMachine.Interact.SetFloppyMedia
...

Note: This does only work for user. FetchUserPrivilegeOnEntities does not accept groupnames.

Michael

Advertisment to support michlstechblog.info

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.