Product Documentation

Remove-AdminRight

Oct 01, 2013

Removes rights from an administrator.

Syntax

Remove-AdminRight -Scope <String> -Role <String> -Administrator <String> [-LoggingId <Guid>] [-AdminAddress <String>] [<CommonParameters>]

Remove-AdminRight -Role <String> -Administrator <String> [-All] [-LoggingId <Guid>] [-AdminAddress <String>] [<CommonParameters>]

Remove-AdminRight [-InputObject] <Right[]> -Administrator <String> [-LoggingId <Guid>] [-AdminAddress <String>] [<CommonParameters>]

Detailed 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.

Parameters

-InputObject<Right[]>

Specifies the rights to remove.

Required? true
Default Value  
Accept Pipeline Input? true (ByValue)

-Scope<String>

Specifies the scope name or scope identifier.

Required? true
Default Value  
Accept Pipeline Input? false

-Role<String>

Specifies the role name or role identifier.

Required? true
Default Value  
Accept Pipeline Input? false

-Administrator<String>

Specifies the name or SID of the administrator.

Required? true
Default Value  
Accept Pipeline Input? false

-All<SwitchParameter>

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

Required? false
Default Value  
Accept Pipeline Input? false

-LoggingId<Guid>

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.

Required? false
Default Value  
Accept Pipeline Input? false

-AdminAddress<String>

Specifies the address of a XenDesktop controller the PowerShell snap-in connects to. You can provide this as a host name or an IP address.

Required? false
Default Value Localhost. Once a value is provided by any cmdlet, this value becomes the default.
Accept Pipeline Input? false

Input Type

Citrix.DelegatedAdmin.Sdk.Right You can pipe the rights to be removed into this command.

Return Values

None

Examples

-------------------------- EXAMPLE 1 --------------------------

C:\PS> RemoveAdminRight -Role 'Help Desk Administrator' -Scope London -Administrator DOMAIN\Admin1

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

-------------------------- EXAMPLE 2 --------------------------

C:\PS> $admin = Get-AdminAdministrator -Name DOMAIN\Admin 
C:\PS> Remove-AdminRight -InputObject $admin.Rights -Administrator DOMAIN\Admin

Removes all rights from administrator 'Admin'.