Set-HarborSecretVault
Points a profile’s OAuth secret at a SecretManagement vault: writes the per-profile secretManagement { vault, secret } block to the local-override config. -Remove takes the profile back off the vault.
Syntax
Section titled “Syntax”Parameter set Set:
Set-HarborSecretVault -ProfileName <string> -SecretName <string> [-Vault <string>] [-ConfigPath <string>] [-WhatIf] [-Confirm]Parameter set Remove:
Set-HarborSecretVault -ProfileName <string> -Remove [-ConfigPath <string>] [-WhatIf] [-Confirm]Description
Section titled “Description”With the block set, Connect-PAMSession pulls the client secret from Microsoft.PowerShell.SecretManagement (Get-Secret -Name <secret> [-Vault <vault>]) BEFORE the DPAPI machine cache – so the secret can live in SecretStore, KeePass, Azure Key Vault or any other vault extension instead of on this machine. The module stays optional: Harbor warns and falls back when it (or the secret) is unavailable. Store the secret itself with, e.g.: Set-Secret -Name HarborOAuth-prod -Secret ‘<client secret>’ -Vault SecretStore
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Set-HarborSecretVault -ProfileName prod -Vault SecretStore -SecretName HarborOAuth-prodExample 2
Section titled “Example 2”Set-HarborSecretVault -ProfileName prod -RemoveParameters
Section titled “Parameters”-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.
-ProfileName
Section titled “-ProfileName”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
Yes | Named | No |
-Remove
Section titled “-Remove”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
SwitchParameter |
Yes | Named | No |
-SecretName
Section titled “-SecretName”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
Yes | 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 Onboard cmdlets
- In PowerShell:
Get-Help Set-HarborSecretVault -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
