Skip to content

Save-HarborConfigDocument

Harbor OnboardNo sign-in neededGenerated from the codeDescribes Onboard 0.59.0

Validates and writes one of the editable standard files (naming / permissions / safe-defaults) from raw JSON text – the Settings UI’s save path.

Terminal window
Save-HarborConfigDocument [-File] <string> -Content <string> [-ConfigPath <string>] [-WhatIf] [-Confirm]

Refuses to write anything that isn’t valid JSON, AND that wouldn’t load as a valid Harbor config: the new content is staged into a temp copy of the whole config set and run through Get-HarborConfig (which calls Test-HarborConfig) first. Only on success is the real file written, with a one-deep .bak kept. So a bad edit can’t break the live config.

Terminal window
Save-HarborConfigDocument -File naming -Content $json

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

Not described in the module help.

Type Required Position Pipeline input
String Yes 0 No

Accepted values: naming, rbac, safe-defaults, policy.

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.