New-VIPermission

This cmdlet creates new permissions on the specified inventory objects for the provided users and groups in the role. By default, new permissions are propagated down the hierarchy to sub-entities. You cannot create new permissions for the following objects: - direct child folders of a datacenter

Syntax

[-Role]  <Role>
[-Entity]  <VIObject>
-Principal  <VIAccount>
[-Propagate  <Boolean>]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Role
Role 1
  • wildcards
  • Specifies the roles for which you want to create new permissions.
    required
    Entity
    VIObject 2
  • wildcards
  • pipeline
  • Specifies the inventory objects for which you want to create new permissions. Passing multiple values to this parameter is obsolete.
    required
    Principal
    VIAccount named
  • wildcards
  • Specifies users and groups to which you want to apply the new permissions. If you specify principal names by using the "domain\name" syntax, wildcards are not supported. Passing multiple values to this parameter is obsolete.
    optional
    Propagate
    Boolean named Indicates that you want to propagate the new permissions to the child inventory objects.
    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.Permission

    Examples


    Example 1

    New-VIRole -Name Role -Server $server -Privilege (Get-VIPrivilege -PrivilegeGroup)
    $permission = New-VIPermission -Role Role -Principal Administrator -Entity (Get-Datacenter)

    Creates a permission on the provided server for a role with the specified privileges.

    Related Commands

    Feedback

    Was this page helpful?