Remove-VIRole
This cmdlet removes the specified roles. To remove a role that is associated with a permission, you need to set the Force parameter to $true.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
Role[] | named |
|
Specifies the roles you want to remove. | optional |
|
SwitchParameter | named |
|
Indicates that you want to remove the role even if it is associated with a permission. | 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
Examples
Example 1
Get-VIRole -Server $server -Name "Customer*" | Remove-VIRole
Removes the roles with names that start with "Customer".
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.