Skip to content

Get-HarborTlsStatus

Harbor HealthNo sign-in neededGenerated from the codeDescribes Health 0.22.0

Is HTTPS set up for a console port? { Port; Bound; IpPort; Thumbprint; NotAfter; ExpiresInDays; Harbor (the cert is Harbor’s own) }. Needs no elevation.

Terminal window
Get-HarborTlsStatus [[-Port] <int>]

Reads the http.sys certificate binding for the port (0.0.0.0 first, then 127.0.0.1) and the bound certificate in LocalMachine\My. Usable is $true only when the certificate is there with its private key and has not expired – that is when a console on this port serves https; otherwise Problem says why (and the console falls back to http on loopback with a warning). Harbor is $true when the certificate is the one Initialize-HarborTls generated. Changes nothing.

Terminal window
Get-HarborTlsStatus

The Onboard console’s port (8787).

Terminal window
8787, 8788 | ForEach-Object { Get-HarborTlsStatus -Port $_ } | Format-Table Port, Usable, ExpiresInDays, Problem

Both consoles at once, e.g. to check the certificate’s expiry before a renewal (Initialize-HarborTls -Renew).

Not described in the module help.

Type Required Position Pipeline input
Int32 No 0 No

Default: 8787.

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.