Set-HarborAssistant
Opts a profile in to (or out of) the Claude assistant: writes the per-profile assistant block to the local-override config.
Syntax
Section titled “Syntax”Parameter set Set (default):
Set-HarborAssistant -ProfileName <string> [-Model <string>] [-MaxTokens <int>] [-ApiKeyEnv <string>] [-SecretName <string>] [-Vault <string>] [-ConfigPath <string>] [-WhatIf] [-Confirm]Parameter set Remove:
Set-HarborAssistant -ProfileName <string> -Remove [-ConfigPath <string>] [-WhatIf] [-Confirm]Description
Section titled “Description”The assistant powers “Explain with AI” on the RBAC Drift page and the “Describe it in words” safe-suggestion box on Create Safe. It is OFF until this block exists with enabled=true AND an API key is available. The key itself is never stored in config, it is resolved at call time:
- the environment variable named by -ApiKeyEnv (default HARBOR_ANTHROPIC_KEY), then
- the SecretManagement secret named by -SecretName [-Vault].
PRIVACY: assistant calls send safe names, member/group names, permission names and the naming-standard structure to the Anthropic API. No passwords or account secrets are ever part of those payloads.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Set-HarborAssistant -ProfileName prod# then give the key to the Windows account that runs Harbor, in USER scope# (never a machine-wide variable: every local user can read those):# [Environment]::SetEnvironmentVariable('HARBOR_ANTHROPIC_KEY', '<api key>', 'User')# Prefer SecretManagement (next example) where it is available.Example 2
Section titled “Example 2”Set-HarborAssistant -ProfileName prod -SecretName HarborClaude -Vault SecretStoreExample 3
Section titled “Example 3”Set-HarborAssistant -ProfileName prod -RemoveParameters
Section titled “Parameters”-ApiKeyEnv
Section titled “-ApiKeyEnv”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.
-MaxTokens
Section titled “-MaxTokens”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
Int32 |
No | Named | No |
Default: 0.
-Model
Section titled “-Model”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
-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 |
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 Onboard cmdlets
- In PowerShell:
Get-Help Set-HarborAssistant -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
