Citrix Virtual Apps and Desktops SDK

Add-AdminRight

Grants a given right to the specified administrator.

Syntax

Add-AdminRight
   -Role <String>
   -Administrator <String>
   [-All]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Add-AdminRight
   [-InputObject] <Right[]>
   -Administrator <String>
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Add-AdminRight
   -Scope <String>
   -Role <String>
   -Administrator <String>
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

Use the Add-AdminRight cmdlet to add rights (role and scope pairs) to an administrator.

For convenience, you can use the -All parameter to specify the ‘All’ scope.

Use the Get-AdminAdministrator cmdlet to determine what rights an administrator has.

This cmdlet cannot be used in case of DaaS customers.

Examples

EXAMPLE 1

Assigns the ‘Help Desk Administrator’ role and ‘London’ scope to the ‘Admin1’ administrator.

Add-AdminRight -Role 'Help Desk Administrator' -Scope London -Administrator DOMAIN\Admin1
<!--NeedCopy-->

EXAMPLE 2

Assigns the ‘Full Administrator’ role and ‘All’ scope to the ‘Admin1’ administrator.

Add-AdminRight -Role 'Full Administrator' -All -Administrator DOMAIN\Admin1
<!--NeedCopy-->

EXAMPLE 3

Copies the administrator rights from ‘ExistingAdmin’ to ‘NewAdmin’.

$admin = Get-AdminAdministrator -Name DOMAIN\ExistingAdmin
Add-AdminRight -InputObject $admin.Rights -Administrator DOMAIN\NewAdmin
<!--NeedCopy-->

Parameters

-Scope

Specifies the scope name or scope identifier.

Type: String
Position: Named
Default value: None
Required: True
Accept pipeline input: False
Accept wildcard characters: False

-Role

Specifies the role name or role identifier.

Type: String
Position: Named
Default value: None
Required: True
Accept pipeline input: False
Accept wildcard characters: False

-Administrator

Specifies the name or ID of the administrator.

Type: String
Position: Named
Default value: None
Required: True
Accept pipeline input: False
Accept wildcard characters: False

-InputObject

Specifies the rights to add from Right objects.

Type: Right[]
Position: 2
Default value: None
Required: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-All

Specifies the ‘All’ scope. This parameter avoids localization issues or having to type the identifier of the ‘All’ scope.

Type: SwitchParameter
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-LoggingId

Specifies the identifier of the high-level operation this cmdlet call forms a part of. Citrix Studio and Director typically create high-level operations. PowerShell scripts can also wrap a series of cmdlet calls in a high-level operation by way of the Start-LogHighLevelOperation and Stop-LogHighLevelOperation cmdlets.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

CitrixCommonParameters

This cmdlet supports the common Citrix parameters: -AdminAddress, -AdminClientIP, -BearerToken, -TraceParent, -TraceState and -VirtualSiteId. For more information, see about_CitrixCommonParameters.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Citrix.DelegatedAdmin.Sdk.Right

You can pipe the rights to be added into this command.

Outputs

None

By default, this cmdlet returns no output.

Add-AdminRight