Skip to content

Set-HarborAssistant

Harbor OnboardNo sign-in neededGenerated from the codeDescribes Onboard 0.59.0

Opts a profile in to (or out of) the Claude assistant: writes the per-profile assistant block to the local-override config.

Parameter set Set (default):

Terminal window
Set-HarborAssistant -ProfileName <string> [-Model <string>] [-MaxTokens <int>] [-ApiKeyEnv <string>] [-SecretName <string>] [-Vault <string>] [-ConfigPath <string>] [-WhatIf] [-Confirm]

Parameter set Remove:

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

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:

  1. the environment variable named by -ApiKeyEnv (default HARBOR_ANTHROPIC_KEY), then
  2. 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.

Terminal window
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.
Terminal window
Set-HarborAssistant -ProfileName prod -SecretName HarborClaude -Vault SecretStore
Terminal window
Set-HarborAssistant -ProfileName prod -Remove

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
Int32 No Named No

Default: 0.

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

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