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

-Role  <Role[]>
[-Force]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Role
Role[] named
  • wildcards
  • pipeline
  • 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
    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

    Feedback

    Was this page helpful?