Citrix Virtual Apps and Desktops SDK

Remove-AdminRight

Removes rights from an administrator.

Syntax

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

Description

This command removes rights from the specified 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

Removes the ‘Help Desk Administrator’ role and ‘London’ scope from user ‘Admin1’

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

EXAMPLE 2

Removes all rights from administrator ‘Admin’.

$admin = Get-AdminAdministrator -Name DOMAIN\Admin
Remove-AdminRight -InputObject $admin.Rights -Administrator DOMAIN\Admin
<!--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 remove.

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 removed into this command.

Outputs

None

By default, this cmdlet returns no output.

Remove-AdminRight