New-CitrixAccessPolicyRule
Citrix: Creates an access policy rule
param(
[Parameter(Mandatory = $true)]
[string]$Name,
[Parameter(Mandatory = $true)]
[int]$DesktopGroupUid,
[Parameter(Mandatory = $true)]
[string]$AllowedUsers
)
try {
Import-Module Citrix.Broker.Admin.V2 -ErrorAction Stop
$rule = New-BrokerAccessPolicyRule -Name $Name -DesktopGroupUid $DesktopGroupUid -AllowedUsers $AllowedUsers -ErrorAction Stop
Write-Output $rule
} catch {
Write-Error $_
exit 1
}The name of the new access policy rule.
The UID of the desktop group to associate with the rule.
The users allowed by this rule.