Skip to content

Initialize-HarborTls

Harbor OnboardWindows administratorGenerated from the codeDescribes Onboard 0.59.0

One-time, ELEVATED: sets up HTTPS for the Harbor consoles on this machine – a certificate (generated, reused or yours) bound in http.sys to both consoles’ ports. Exported by both products.

Terminal window
Initialize-HarborTls [[-Port] <int[]>] [[-CertThumbprint] <string>] [[-Hostname] <string[]>] [[-ValidYears] <int>] [-AllowRemote] [-TrustRoot] [-Renew] [-Force] [-WhatIf] [-Confirm]

Without -CertThumbprint it reuses Harbor’s own certificate while it has more than 30 days left (or always generates a new one with -Renew). With -TrustRoot the leaf certificate is also trusted machine-wide, so browsers show no warning. Re-running is safe: each binding is swapped in place, and a failure on any port restores every port already changed (both consoles stay on one scheme). After it, start the consoles normally – they serve https on the same ports. If CyberArk SSO is configured, register https://localhost:8787/auth/callback and https://localhost:8788/auth/callback in the Identity app (keep the http ones until every console has moved).

Terminal window
Initialize-HarborTls -TrustRoot # loopback consoles, trusted cert
Terminal window
Initialize-HarborTls -CertThumbprint AB12... -AllowRemote -Hostname harbor.corp.local

Not described in the module help.

Type Required Position Pipeline input
SwitchParameter No Named No

Not described in the module help.

Type Required Position Pipeline input
String No 1 No

Asks for confirmation before the command changes anything.

Type Required Position Pipeline input
SwitchParameter No Named No

Aliases: cf.

Replace a binding that belongs to another application (otherwise refused).

Type Required Position Pipeline input
SwitchParameter No Named No

Not described in the module help.

Type Required Position Pipeline input
String[] No 2 No

Default: @().

Not described in the module help.

Type Required Position Pipeline input
Int32[] No 0 No

Default: $script:HarborTlsPorts.

Not described in the module help.

Type Required Position Pipeline input
SwitchParameter No Named No

Not described in the module help.

Type Required Position Pipeline input
SwitchParameter No Named No

Not described in the module help.

Type Required Position Pipeline input
Int32 No 3 No

Default: 2.

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.