Skip to content

Connect-PAMSession

Harbor OnboardNo sign-in neededGenerated from the codeDescribes Onboard 0.59.0

Authenticates to CyberArk Privilege Cloud as the Harbor service user and opens the module session every other live cmdlet uses.

Terminal window
Connect-PAMSession [[-ClientSecret] <securestring>] [[-Username] <string>] [[-Password] <securestring>] [[-ConfigPath] <string>] [[-ConfigProfile] <string>] [-SkipVerify]

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).

Terminal window
Connect-PAMSession # OAuth (default), secret from env/prompt
Terminal window
Connect-PAMSession -Username svc_harbor # password profile; prompts for the password

Not described in the module help.

Type Required Position Pipeline input
Security.SecureString No 0 No

Not described in the module help.

Type Required Position Pipeline input
String No 3 No

Not described in the module help.

Type Required Position Pipeline input
String No 4 No

Not described in the module help.

Type Required Position Pipeline input
Security.SecureString No 2 No

Not described in the module help.

Type Required Position Pipeline input
SwitchParameter No Named No

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).

Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.