Connect-PAMSession
Authenticates to CyberArk Privilege Cloud as the Harbor service user and opens the module session every other live cmdlet uses.
Syntax
Section titled “Syntax”Connect-PAMSession [[-ClientSecret] <securestring>] [[-Username] <string>] [[-Password] <securestring>] [[-ConfigPath] <string>] [[-ConfigProfile] <string>] [-SkipVerify]Description
Section titled “Description”The profile’s EXPLICIT serviceAccount block (Set-HarborServiceAccount) says how – an older profile without one is read as the equivalent block:
- kind ‘oauth’: OAuth2 client-credentials against CyberArk Identity.
- kind ‘cyberark’ | ‘ldap’ | ‘radius’ | ‘windows’: a CyberArk vault-user logon via the PVWA auth API (username from -Username, else the block / profile).
The secret (client secret or password) comes from -ClientSecret / -Password when given, otherwise from EXACTLY the declared secretSource (dpapi | secretManagement | env | prompt) – there is no fallback chain any more. ‘authMethod: demo’ = demo. Nothing secret is written to disk – credentials live in module memory only and are cleared by Disconnect-PAMSession. After authenticating, a lightweight GET /API/Safes?limit=1 verifies the token works (skip with -SkipVerify).
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Connect-PAMSession # OAuth (default), secret from env/promptExample 2
Section titled “Example 2”Connect-PAMSession -Username svc_harbor # password profile; prompts for the passwordParameters
Section titled “Parameters”-ClientSecret
Section titled “-ClientSecret”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
Security.SecureString |
No | 0 | No |
-ConfigPath
Section titled “-ConfigPath”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 3 | No |
-ConfigProfile
Section titled “-ConfigProfile”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 4 | No |
-Password
Section titled “-Password”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
Security.SecureString |
No | 2 | No |
-SkipVerify
Section titled “-SkipVerify”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
SwitchParameter |
No | Named | No |
-Username
Section titled “-Username”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).
See also
Section titled “See also”- All Harbor Onboard cmdlets
- In PowerShell:
Get-Help Connect-PAMSession -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
