Skip to content

Add-CitrixPermission

Citrix: Adds a permission to a role

param(
	[Parameter(Mandatory = $true)]
	[string]$RoleName,

	[Parameter(Mandatory = $true)]
	[string]$Permission
)

try {
	Import-Module Citrix.DelegatedAdmin.Admin.V1 -ErrorAction Stop
	Add-AdminPermission -Role $RoleName -Permission $Permission -ErrorAction Stop
	Write-Output "Successfully added permission '$Permission' to role '$RoleName'."
} catch {
	Write-Error $_
	exit 1
}

The name of the role.

The permission to add.

An interactive directory of PowerShell scripts.