For the complete documentation index, see llms.txt. This page is also available as Markdown.

Test-PSUAppToken

Validates a PowerShell Universal app token.

SYNOPSIS

Validates a PowerShell Universal app token.

SYNTAX

Test-PSUAppToken [-Token] <String> [-Identity <String>] [-Role <String>] [-ComputerName <String>]
 [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate]
 [-Cookies] [<CommonParameters>]

DESCRIPTION

Sends a token, and optionally an identity and role context, to PowerShell Universal and returns whether the token is valid for that context.

EXAMPLES

Example 1

PS C:\> Test-PSUAppToken -Token "<token>" -Identity "svc-api" -Role "ApiUsers"

Validates the token for the svc-api identity and ApiUsers role.

PARAMETERS

-AppToken

Specifies the app token to use when authenticating to the PowerShell Universal management API.

-ComputerName

Specifies the URL or host name of the target PowerShell Universal instance. Bare host names are normalized to an http://:5000 URL.

-Cookies

Reuses and persists authentication cookies for the current PowerShell session.

-Credential

Specifies the credentials to use for Basic authentication against the PowerShell Universal management API.

-Identity

Specifies the identity to target or validate.

-Integrated

Uses the in-process integrated management client when the cmdlet runs inside PowerShell Universal.

-Role

Specifies one or more roles to assign or allow.

-Token

Specifies the app token value to validate.

-TrustCertificate

Allows connections to servers with untrusted TLS certificates.

-UseDefaultCredentials

Uses the current Windows credentials when authenticating to the management API.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

Last updated

Was this helpful?