Citrix Daas SDK

Test-AdminAccess

Retrieves the scopes where the specified operation is permitted.

Syntax

Test-AdminAccess
    [-Operation] <String[]>
    [-Annotate]
    [-RejectedScopes]
    [<CitrixCommonParameters>]
    [<CommonParameters>]
<!--NeedCopy-->

Description

This cmdlet evaluates what rights the current user has, and from these determines the scopes where the specified operation is permitted.

Operations are the indivisible unit of functionality that each XenDesktop service can perform, and usually correspond to individual cmdlets.

If you specify the -Annotate option or specify multiple operations to check, the resulting object is annotated with the operation the result relates to.

Examples

EXAMPLE 1

Queries the scopes where ‘Broker:GetCatalog’ is permitted.

Test-AdminAccess -Operation 'Broker:GetCatalog'
<!--NeedCopy-->

EXAMPLE 2

Queries the scopes where ‘Broker:GetCatalog’ or ‘Broker:GetMachine’ are permitted.

Test-AdminAccess -Operation 'Broker:GetCatalog','Broker:GetMachine'
<!--NeedCopy-->

Parameters

-Operation

The operation to query.

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

-Annotate

Annotates each result with the operation it relates to.

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

-RejectedScopes

Gets the scopes where operations are not allowed as well as the scopes where an operation is allowed

Type: SwitchParameter
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

None

You can’t pipe objects to this cmdlet.

Outputs

Citrix.DelegatedAdmin.Sdk.ScopeReference

The list of permissible scopes for the specified single operation.

PSObject

The list of permissible scopes for each operation. This type of object is returned when the -Annotate option or multiple operations are specified.

Notes

If the specified operation has unrestricted access a single object is returned representing the ‘All’ scope with a ScopeId of Guid.Empty (00000000-0000-0000-0000-000000000000).

Test-AdminAccess