Retrieves the scopes where the specified operation is permitted.
Test-AdminAccess [-Operation] <String> [-Annotate] [-BearerToken <String>] [-AdminAddress <String>] [<CommonParameters>]
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.
|Name||Description||Required?||Pipeline Input||Default Value|
|Operation||The operation to query.||true||true (ByValue)|
|Annotate||Annotates each result with the operation it relates to.||false||false|
|BearerToken||Specifies the bearer token assigned to the calling user||false||false|
|AdminAddress||Specifies the address of a XenDesktop controller the PowerShell snap-in will connect to. You can provide this as a host name or an IP address.||false||false||Localhost. Once a value is provided by any cmdlet, this value becomes the default.|
The list of permissible scopes for the specified single operation.
The list of permissible scopes for each operation. This type of object is returned when the -Annotate option or multiple operations are specified.
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).
C:\PS> Test-AdminAccess -Operation 'Broker:GetCatalog'
Queries the scopes where 'Broker:GetCatalog' is permitted.
C:\PS> Test-AdminAccess -Operation 'Broker:GetCatalog','Broker:GetMachine'
Queries the scopes where 'Broker:GetCatalog' or 'Broker:GetMachine' are permitted.