Test-PAMConnection
Live connectivity check for the current session: confirms we can actually reach and call CyberArk right now (session present, token still valid, PVWA API responding). Powers the dashboard’s connection tiles.
Syntax
Section titled “Syntax”Test-PAMConnection [[-ConfigPath] <string>] [[-ConfigProfile] <string>]Description
Section titled “Description”Three checks, each with a plain-words Detail: a session exists, its access token has not expired (an expired one refreshes on the next call), and one small read (GET API/Safes, limit 1, 10 s timeout) answers. It never connects by itself – without a session Connected is $false and only the Session check is reported.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Test-PAMConnection | Select-Object -ExpandProperty ChecksExample 2
Section titled “Example 2”if (-not (Test-PAMConnection).Connected) { Connect-PAMSession -ConfigProfile prod }Parameters
Section titled “Parameters”-ConfigPath
Section titled “-ConfigPath”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 0 | No |
-ConfigProfile
Section titled “-ConfigProfile”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 1 | No |
This command also accepts the PowerShell common parameters (-Verbose, -ErrorAction, and so on).
Outputs
Section titled “Outputs”- PSCustomObject: Connected (bool), PvwaUrl, Profile, ClientId, Checks (array of { Check, Ok, Detail })
See also
Section titled “See also”- All Harbor Onboard cmdlets
- In PowerShell:
Get-Help Test-PAMConnection -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
