Uninstall
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.
1. Stop the consoles
Section titled “1. Stop the consoles”Gear menu, Stop server, on each console. Or close the minimised PowerShell windows.
2. Remove the Windows service
Section titled “2. Remove the Windows service”From an elevated PowerShell, in the release folder:
Import-Module .\HarborOnboard\HarborOnboard.psd1Uninstall-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.
3. Remove scheduled scans
Section titled “3. Remove scheduled scans”Unregister-PAMComplianceSchedule # Harbor Onboard compliance scansUnregister-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).
netsh http delete sslcert ipport=127.0.0.1:8787netsh http delete sslcert ipport=127.0.0.1:8788
# Harbor's generated certificate (private key) and its trust entryGet-ChildItem Cert:\LocalMachine\My | Where-Object FriendlyName -eq 'Harbor Web' | Remove-ItemGet-ChildItem Cert:\LocalMachine\Root | Where-Object Subject -eq 'CN=Harbor Web (localhost)' | Remove-ItemIf you bound your own certificate (-CertThumbprint), delete only the bindings;
the certificate belongs to you.
5. Remove the modules and shortcuts
Section titled “5. Remove the modules and shortcuts”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.
6. Remove the data
Section titled “6. Remove the data”%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:
Remove-Item "$env:ProgramData\Harbor" -RecurseLogs and registers kept under the release folders go with those folders.
7. Remove the trust you added
Section titled “7. Remove the trust you added”Get-ChildItem Cert:\CurrentUser\TrustedPublisher | Where-Object Subject -eq 'CN=Harbor Code Signing' | Remove-Item8. Tidy up in CyberArk
Section titled “8. Tidy up in CyberArk”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.
