Remove-VIRole Command | Vmware PowerCLI Reference

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

Remove-VIRole
-Role < Role[] >
[-Force ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Role Role[] named
  • pipeline
  • wildcards
Specifies the roles you want to remove.
optional Force SwitchParameter named
Indicates that you want to remove the role even if it is associated with a permission.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
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 creates a new role on the specified servers and applies the provided privileges.

This cmdlet removes the specified roles.

This cmdlet modifies the privileges of the provided roles.