Skip to content

Uninstall

Harbor suiteWindows administratorDescribes Onboard 0.58.0 / Health 0.21.0

Harbor installs nothing in CyberArk, so removing it is a local job. Work through the sections that apply to your install. Most steps need an elevated PowerShell.

Gear menu, Stop server, on each console. Or close the minimised PowerShell windows.

From an elevated PowerShell, in the release folder:

Terminal window
Import-Module .\HarborOnboard\HarborOnboard.psd1
Uninstall-HarborService -RemoveCertificate -RemoveFiles
Part What it does
Always Stops and unregisters the Harbor Onboard Web task and removes the URL reservation of port 8787. It deletes the https bindings of both consoles’ ports (8787 and Harbor Health’s 8788, on 127.0.0.1 and 0.0.0.0), but only a binding that points at a Harbor certificate. A binding with any other certificate is kept and named in a warning.
-RemoveCertificate Also removes Harbor’s own certificates, named Harbor Web (this release) or Harbor Onboard Web (releases up to 0.57), from LocalMachine\My and their trust copy in LocalMachine\Root. Only a server-authentication leaf with Harbor’s name is touched; your own certificate (-CertThumbprint) is never removed, and one still bound on another port is kept.
-RemoveFiles Deletes the deployed code in %ProgramFiles%\Harbor.

It never deletes the data store %ProgramData%\Harbor. The result lists the bindings it removed and kept and the certificates it removed.

Terminal window
Unregister-PAMComplianceSchedule # Harbor Onboard compliance scans
Unregister-HarborHealthSchedule # Harbor Health scans (in the Harbor Health module)

Snapshots and history are kept.

4. Remove HTTPS on a machine without the service

Section titled “4. Remove HTTPS on a machine without the service”

Step 2 already does this on a service install. Without the service (you ran Initialize-HarborTls or -SetupTls yourself), remove the bindings and Harbor’s certificate by hand, elevated. Use 0.0.0.0 instead of 127.0.0.1 for a console that served other machines (-AllowRemote).

Terminal window
netsh http delete sslcert ipport=127.0.0.1:8787
netsh http delete sslcert ipport=127.0.0.1:8788
# Harbor's generated certificate (private key) and its trust entry
Get-ChildItem Cert:\LocalMachine\My | Where-Object FriendlyName -eq 'Harbor Web' | Remove-Item
Get-ChildItem Cert:\LocalMachine\Root | Where-Object Subject -eq 'CN=Harbor Web (localhost)' | Remove-Item

If you bound your own certificate (-CertThumbprint), delete only the bindings; the certificate belongs to you.

Delete the HarborOnboard and HarborHealth folders that -InstallModule put in:

Install Folders
Per-user Documents\WindowsPowerShell\Modules and Documents\PowerShell\Modules
All users %ProgramFiles%\WindowsPowerShell\Modules and %ProgramFiles%\PowerShell\Modules

Delete the shortcuts Harbor Onboard, Harbor Onboard (Demo), Harbor Health and Harbor Health (Demo) from the Desktop, and the Harbor folder in the Start Menu. Then delete the extracted release folders.

%ProgramData%\Harbor holds the shared configuration, the stored secrets (DPAPI blobs), the sign-in session store and the compliance and fleet data. Delete it when no Harbor install on the machine needs it any more:

Terminal window
Remove-Item "$env:ProgramData\Harbor" -Recurse

Logs and registers kept under the release folders go with those folders.

Terminal window
Get-ChildItem Cert:\CurrentUser\TrustedPublisher | Where-Object Subject -eq 'CN=Harbor Code Signing' | Remove-Item

Harbor does not do these for you:

  • Rotate or remove the service account’s secret, or disable the service user, if nothing else uses it.
  • Remove the OpenID Connect app you registered for single sign-on, or its Harbor redirect URIs.
  • Remove the webhook in Teams or Slack, if you configured notifications.

The safes, accounts and members Harbor created stay in the vault: they are yours.

Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.