Set-VIRole
This cmdlet modifies the privileges of the provided roles.
Syntax
-Role
<Role[]>
[-AddPrivilege <Privilege[]>]
[-Name <String>]
[-Server <VIServer[]>]
[CommonParameters]
[-AddPrivilege <Privilege[]>]
[-Name <String>]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
Role[] | named |
|
Specifies the roles you want to modify. | optional |
|
Privilege[] | named |
|
Specifies privileges and privilege groups you want to add to the provided roles. | optional |
|
String | named |
|
Provides a new name for the provided role. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. |
-Role
<Role[]>
[-Name <String>]
[-RemovePrivilege <Privilege[]>]
[-Server <VIServer[]>]
[CommonParameters]
[-Name <String>]
[-RemovePrivilege <Privilege[]>]
[-Server <VIServer[]>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
Role[] | named |
|
Specifies the roles you want to modify. | optional |
|
String | named |
|
Provides a new name for the provided role. | optional |
|
Privilege[] | named |
|
Specifies privileges or privilege groups you want to remove from the provided roles. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. |
Output
VMware.VimAutomation.ViCore.Types.V1.PermissionManagement.Role
Examples
Example 1
Set-VIRole -Role Role -AddPrivilege (Get-VIPrivilege -Name 'Create Datacenter')
Adds the "Create Datacenter" privilege to the Role role.
Related Commands
VIRole
This cmdlet retrieves all roles defined on the provided servers.
This cmdlet modifies the privileges of the provided roles.
This cmdlet removes the specified roles.
This cmdlet creates a new role on the specified servers and applies the provided privileges.