Save-HarborConfigDocument
Validates and writes one of the editable standard files (naming / permissions / safe-defaults) from raw JSON text – the Settings UI’s save path.
Syntax
Section titled “Syntax”Save-HarborConfigDocument [-File] <string> -Content <string> [-ConfigPath <string>] [-WhatIf] [-Confirm]Description
Section titled “Description”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.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Save-HarborConfigDocument -File naming -Content $jsonParameters
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.
-Content
Section titled “-Content”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.
-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 Save-HarborConfigDocument -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
