Skip to content

Uninstall-HarborService

Harbor OnboardWindows administratorGenerated from the codeDescribes Onboard 0.59.0

Removes the Harbor service task and its http.sys bindings. The deployed files and certificate are kept unless asked for.

Terminal window
Uninstall-HarborService [[-Port] <int>] [[-TaskName] <string>] [[-InstallPath] <string>] [-RemoveCertificate] [-RemoveFiles] [-WhatIf] [-Confirm]

Run from an elevated console. It stops and unregisters the scheduled task, removes the http.sys url reservation for -Port, and deletes the https certificate bindings of BOTH consoles’ ports (-Port and Harbor Health’s 8788, on 0.0.0.0 and 127.0.0.1) – but only a binding that points at a Harbor certificate; a binding with any other certificate is kept and reported. -RemoveCertificate also removes Harbor’s own certificates: FriendlyName ‘Harbor Web’ (Initialize-HarborTls) or ‘Harbor Onboard Web’ (installs up to 0.57), from LocalMachine\My AND their trust copy in LocalMachine\Root. A certificate is Harbor’s only when it is a server-authentication leaf with that FriendlyName (and, for ‘Harbor Web’, Harbor’s own subject); your own certificate (-CertThumbprint) is never removed, and one still bound on another port is kept. -RemoveFiles deletes the deployed code under %ProgramFiles%\Harbor (never the %ProgramData%\Harbor data store).

Terminal window
Uninstall-HarborService
Terminal window
Uninstall-HarborService -RemoveCertificate -RemoveFiles

Asks for confirmation before the command changes anything.

Type Required Position Pipeline input
SwitchParameter No Named No

Aliases: cf.

The CODE root (never the shared data store – -RemoveFiles must not wipe it).

Type Required Position Pipeline input
String No 2 No

Default: (Join-Path $env:ProgramFiles 'Harbor').

Not described in the module help.

Type Required Position Pipeline input
Int32 No 0 No

Default: 8787.

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
String No 1 No

Default: Harbor Onboard Web.

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.