Manage vCenter permissions with VMware PowerCli
Sometimes we need to manage vCenter permision for diffrent users to have access to diffrent VMs. PowerShell VMware module come handy here, it contain command VIPermission we can use it with Get-, Set-, New- and Remove- verbs.

VMware vCenter per
In my lab I have created diffrent folders to separate offices VM’s now I need to add permission to personal from one office to be able only see VM’s belongs to them. First I will list out all VM folders. We will use another command which part of VMware PowerCli Module Get-Folder -Type VM we will list all folders which keep VM’s in.

List of VM folders
To assign permission to only one folder I will create new varible which will store one folder. $Osk = Get-Folder -Name Osaka

Assign variable
When we have ready varible we can add new permission to folder. We will use command New-VIPermission -Entity $Osk -Principle ‘username’ -Role ‘role to assign’ -Propagate:$false.

Assigning new permission
This command assigned ReadOnly permission for user to folder Osaka. To list we can use Get-VIPermission -Entity $osk. We can as well remove permission by first listing permision for specific user and pipe it to Remove-VIPermission.

Listing folder permission

Removing permission form the folder
Thank you for reading.
Pingback: Working with VMware vCenter using Powershell and TabExpansionPlusPlus module | Virtual Elementary·