Skip to content

Set-HarborServiceAccount

Harbor HealthNo sign-in neededGenerated from the codeDescribes Health 0.22.0

Declares the console’s service account (The service account is explicit). Exported by both products.

Parameter set Set (default):

Terminal window
Set-HarborServiceAccount -Kind <string> -SecretSource <string> [-ClientId <string>] [-Username <string>] [-Secret <securestring>] [-SecretName <string>] [-Vault <string>] [-EnvVar <string>] [-Connect <string>] [-ProfileName <string>] [-ConfigPath <string>] [-WhatIf] [-Confirm]

Parameter set Remove:

Terminal window
Set-HarborServiceAccount -Remove [-ProfileName <string>] [-ConfigPath <string>] [-WhatIf] [-Confirm]

Writes the profile’s serviceAccount block – the kind, the client id / user name, WHERE its secret comes from, and whether the console connects it at startup – into the local-override config (the suite-shared file by default), atomically. With -SecretSource dpapi and -Secret, the secret is stored for THIS Windows account (DPAPI-CurrentUser). With secretManagement, -SecretName (and -Vault) point at the vault. -Remove deletes the block: the console then has no service account (SSO operators keep their own vault sessions).

Terminal window
Set-HarborServiceAccount -Kind oauth -ClientId svc-harbor@corp -SecretSource dpapi -Secret (Read-Host -AsSecureString) -Connect startup
Terminal window
Set-HarborServiceAccount -Kind cyberark -Username svc_harbor -SecretSource secretManagement -SecretName HarborSvc -Vault SecretStore

Not described in the module help.

Type Required Position Pipeline input
String No Named No

Not described in the module help.

Type Required Position Pipeline input
String No Named No

Asks for confirmation before the command changes anything.

Type Required Position Pipeline input
SwitchParameter No Named No

Aliases: cf.

Not described in the module help.

Type Required Position Pipeline input
String No Named No

Accepted values: startup, manual. Default: manual.

Not described in the module help.

Type Required Position Pipeline input
String No Named No

Not described in the module help.

Type Required Position Pipeline input
String Yes Named No

Accepted values: oauth, cyberark, ldap, radius, windows.

Not described in the module help.

Type Required Position Pipeline input
String No Named No

Not described in the module help.

Type Required Position Pipeline input
SwitchParameter Yes Named No

Not described in the module help.

Type Required Position Pipeline input
Security.SecureString No Named No

Not described in the module help.

Type Required Position Pipeline input
String No Named No

Not described in the module help.

Type Required Position Pipeline input
String Yes Named No

Accepted values: dpapi, secretManagement, env, prompt.

Not described in the module help.

Type Required Position Pipeline input
String No Named No

Not described in the module help.

Type Required Position Pipeline input
String No Named No

Shows what the command would do, without doing it.

Type Required Position Pipeline input
SwitchParameter No Named No

Aliases: wi.

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.