Set-HarborServiceAccount
Declares the console’s service account (The service account is explicit). Exported by both products.
Syntax
Section titled “Syntax”Parameter set Set (default):
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:
Set-HarborServiceAccount -Remove [-ProfileName <string>] [-ConfigPath <string>] [-WhatIf] [-Confirm]Description
Section titled “Description”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).
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Set-HarborServiceAccount -Kind oauth -ClientId svc-harbor@corp -SecretSource dpapi -Secret (Read-Host -AsSecureString) -Connect startupExample 2
Section titled “Example 2”Set-HarborServiceAccount -Kind cyberark -Username svc_harbor -SecretSource secretManagement -SecretName HarborSvc -Vault SecretStoreParameters
Section titled “Parameters”-ClientId
Section titled “-ClientId”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
-ConfigPath
Section titled “-ConfigPath”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
-Confirm
Section titled “-Confirm”Asks for confirmation before the command changes anything.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
SwitchParameter |
No | Named | No |
Aliases: cf.
-Connect
Section titled “-Connect”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
Accepted values: startup, manual. Default: manual.
-EnvVar
Section titled “-EnvVar”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.
-ProfileName
Section titled “-ProfileName”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
-Remove
Section titled “-Remove”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
SwitchParameter |
Yes | Named | No |
-Secret
Section titled “-Secret”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
Security.SecureString |
No | Named | No |
-SecretName
Section titled “-SecretName”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
-SecretSource
Section titled “-SecretSource”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
Yes | Named | No |
Accepted values: dpapi, secretManagement, env, prompt.
-Username
Section titled “-Username”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
-Vault
Section titled “-Vault”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
-WhatIf
Section titled “-WhatIf”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).
See also
Section titled “See also”- All Harbor Health cmdlets
- In PowerShell:
Get-Help Set-HarborServiceAccount -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
