Skip to main content

Test-IMAccessToken

SYNOPSIS

Tests the validity of an Immich access token

SYNTAX

Test-IMAccessToken [[-Session] <ImmichSession>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Verifies that the provided access token is valid and can be used for authentication with the Immich server. Returns a boolean value indicating whether the token is valid.

EXAMPLES

EXAMPLE 1

Test-IMAccessToken

Tests the validity of the access token in the default session.

EXAMPLE 2

Test-IMAccessToken -Session $MySession

Tests the validity of the access token in a specific session.

EXAMPLE 3

if (Test-IMAccessToken) { Write-Host 'Token is valid' } else { Write-Host 'Token is invalid' }

Uses the return value to conditionally execute code based on token validity.

PARAMETERS

-Session

Optionally define an Immich session object to use. This is useful when you are connected to more than one Immich instance. If not specified, uses the default session.

Type: ImmichSession
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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

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

OUTPUTS

System.Boolean

NOTES

EDIT THIS DOC

This page was auto-generated from the powershell command comment based help. To edit the content of this page, update the script file comment based help on github Github