Product Documentation

Remove-AdminRole

Oct 12, 2015

Removes a role from the site.

Syntax

Remove-AdminRole [-InputObject] <Role[]> [-LoggingId <Guid>] [-AdminAddress <String>] [<CommonParameters>]

Remove-AdminRole [-Id] <Guid[]> [-LoggingId <Guid>] [-AdminAddress <String>] [<CommonParameters>]

Remove-AdminRole [-Name] <String[]> [-LoggingId <Guid>] [-AdminAddress <String>] [<CommonParameters>]

Detailed Description

The Remove-AdminRole cmdlet deletes roles from the site.

You cannot remove built-in roles or roles that are currently assigned to an administrator.

Parameters

-InputObject<Role[]>

Specifies the roles to remove (by role object).

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

-Id<Guid[]>

Specifies the roles to remove (by role id).

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

-Name<String[]>

Specifies the roles to remove (by role name).

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

-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.Role You can pipe the roles to be deleted into this command.

Return Values

None

Examples

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

C:\PS> Remove-AdminRole -Name Supervisor

Remove the Supervisor role.

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

C:\PS> Get-AdminRole -BuiltIn $false | Remove-AdminRole

Attempt to remove all custom roles. This fails if one of the roles is assigned to an administrator.