powershellscripts.com

Tutorials  PowerShell Cmdlet Help for New-VIPermission



NAME
New-VIPermission

SYNOPSIS
Creates new permissions on the specified inventory objects for the provided users and groups in the role.

SYNTAX
New-VIPermission [-Entity] [-Principal] [-Role] [-Propagate []] [-Server
] [-WhatIf] [-Confirm] []


DESCRIPTION
Creates new permissions on the specified inventory objects for the provided users and groups in the role. By defaul
t, new permissions are propagated down the hierarchy to sub-entities. You cannot create new permissions for the fol
lowing 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
Specify the inventory objects for which you want to create new permissions.

Required? true
Position? 3
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Principal
Specify users and groups to which you want to apply the new permissions. If you specify principal names by usin
g the "domain\name" syntax, wildcards are not supported.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Role
Specify the roles for which you want to create new permissions.

Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Propagate []
Indicate that you want to propagate the new permissions to the child inventory objects.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Server
Specify the vSphere server on which you want to run the cmdlet. If no value is given to this parameter, the com
mand runs on the default servers. For more information about default servers, see the description of Connect-VI
Server.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
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


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
Permission


NOTES


You can specify permissions to a datastore only on vSphere 4.0 and later.

-------------- Example 1 --------------

C:\PS>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: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/New-VIPermission.html
Get-VIPermission
Remove-VIPermission
Set-VIPermission
Get-VIPrivilege
Get-VIRole
New-VIRole
Remove-VIRole
Set-VIRole