< Back
New-VIPermission
Post
NAME New-VIPermission
SYNOPSIS
This cmdlet creates new permissions on the specified inventory objects for the provided users and groups in the
role.
SYNTAX
New-VIPermission [-Principal] <VIAccount> [-Role] <Role> [-Entity] <VIObject> [-Propagate <Boolean>] [-Server
<VIServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
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
- root resource pools of clusters and standalone hosts.
These objects always inherit the permissions of their parent.
PARAMETERS
-Entity <VIObject>
Specifies the inventory objects for which you want to create new permissions. Passing multiple values to this
parameter is obsolete.
Required? true
Position? 3
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Principal <VIAccount>
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.
Required? true
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Propagate <Boolean>
Indicates that you want to propagate the new permissions to the child inventory objects.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Role <Role>
Specifies the roles for which you want to create new permissions.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Server <VIServer[]>
Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Confirm [<SwitchParameter>]
If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,
the cmdlet runs without asking for user confirmation.
Required? false
Position? named
Default value $true
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are
modified.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
The one or more newly created Permission objects
NOTES
You can specify permissions to a datastore only on vSphere 4.1 and later.
-------------------------- 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 LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... ssion.html
Get-VIPermission
Remove-VIPermission
Set-VIPermission
Get-VIPrivilege
Get-VIRole
New-VIRole
Remove-VIRole
Set-VIRole
SYNOPSIS
This cmdlet creates new permissions on the specified inventory objects for the provided users and groups in the
role.
SYNTAX
New-VIPermission [-Principal] <VIAccount> [-Role] <Role> [-Entity] <VIObject> [-Propagate <Boolean>] [-Server
<VIServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
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
- root resource pools of clusters and standalone hosts.
These objects always inherit the permissions of their parent.
PARAMETERS
-Entity <VIObject>
Specifies the inventory objects for which you want to create new permissions. Passing multiple values to this
parameter is obsolete.
Required? true
Position? 3
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? true
-Principal <VIAccount>
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.
Required? true
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Propagate <Boolean>
Indicates that you want to propagate the new permissions to the child inventory objects.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Role <Role>
Specifies the roles for which you want to create new permissions.
Required? true
Position? 2
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Server <VIServer[]>
Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? true
-Confirm [<SwitchParameter>]
If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,
the cmdlet runs without asking for user confirmation.
Required? false
Position? named
Default value $true
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are
modified.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
The one or more newly created Permission objects
NOTES
You can specify permissions to a datastore only on vSphere 4.1 and later.
-------------------------- 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 LINKS
Online Version: https://code.vmware.com/doc/preview?id= ... ssion.html
Get-VIPermission
Remove-VIPermission
Set-VIPermission
Get-VIPrivilege
Get-VIRole
New-VIRole
Remove-VIRole
Set-VIRole