Set-VIRole

This cmdlet modifies the privileges of the provided roles.

Syntax

-Role  <Role[]>
[-AddPrivilege  <Privilege[]>]
[-Name  <String>]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Role
Role[] named
  • wildcards
  • pipeline
  • Specifies the roles you want to modify.
    optional
    AddPrivilege
    Privilege[] named
  • wildcards
  • Specifies privileges and privilege groups you want to add to the provided roles.
    optional
    Name
    String named Provides a new name for the provided role.
    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.

    -Role  <Role[]>
    [-Name  <String>]
    [-RemovePrivilege  <Privilege[]>]
    [-Server  <VIServer[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    required
    Role
    Role[] named
  • wildcards
  • pipeline
  • Specifies the roles you want to modify.
    optional
    Name
    String named Provides a new name for the provided role.
    optional
    RemovePrivilege
    Privilege[] named
  • wildcards
  • Specifies privileges or privilege groups you want to remove from the provided roles.
    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

    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

    Feedback

    Was this page helpful?