Skip to content

Install: all users / Program Files

Harbor suiteWindows administratorDescribes Onboard 0.58.0 / Health 0.21.0

An all-users install puts Harbor’s code where only administrators can change it: under %ProgramFiles%. Use it on any machine more than one person signs in to, and whenever Harbor code will run elevated.

Two things run Harbor code with more rights than an operator has:

  • The HTTPS setup runs elevated, once per machine.
  • The Windows service runs as SYSTEM, at every boot.

If a standard user could change the files that run there, they could plant code that runs as an administrator or as SYSTEM. So Harbor refuses:

  • The -SetupTls switches (Install-Harbor.ps1, Launch-Harbor.ps1 and the Harbor Health equivalents) open the elevated step for you only when no standard user can write the Harbor folder, checked by its owner and its permissions, and checked again inside the elevated window before anything loads; or when every script in it carries a valid signature. Otherwise they print a short refusal with at most five reasons and the way out.
  • The Windows service deploys its own copy to %ProgramFiles%\Harbor and refuses to start code that is not owned by SYSTEM, Administrators or TrustedInstaller. See Run as a Windows service.

Option A: install the modules for all users

Section titled “Option A: install the modules for all users”

From an elevated PowerShell, in each extracted release folder:

Terminal window
cd C:\Harbor\harbor-onboard
.\Install-Harbor.ps1 -InstallModule -Scope AllUsers
cd C:\Harbor\harbor-health
.\Install-HarborHealth.ps1 -InstallModule -Scope AllUsers

This copies each module, in a version subfolder, into both PowerShell editions’ machine-wide module folders:

%ProgramFiles%\WindowsPowerShell\Modules\HarborOnboard\0.58.0\
%ProgramFiles%\PowerShell\Modules\HarborOnboard\0.58.0\

Then set up HTTPS from that copy, still elevated:

Terminal window
Import-Module "$env:ProgramFiles\WindowsPowerShell\Modules\HarborOnboard"
Initialize-HarborTls -TrustRoot

One run covers both consoles. Any user can now start a console from the installed module:

Terminal window
Import-Module HarborOnboard
Start-HarborWeb

Option B: extract the release under Program Files

Section titled “Option B: extract the release under Program Files”

From an elevated PowerShell, extract both verified zips into an admin-only folder, then run the installers there:

Terminal window
$root = Join-Path $env:ProgramFiles 'Harbor Consoles' # any admin-only folder name
Expand-Archive .\HarborOnboard-0.58.0.zip -DestinationPath "$root\harbor-onboard"
Expand-Archive .\HarborHealth-0.21.0.zip -DestinationPath "$root\harbor-health"
& "$root\harbor-onboard\Install-Harbor.ps1" -InstallShortcuts -SetupTls

Because the tree is owned by Administrators and standard users can only read it, -SetupTls opens the elevated step itself (one UAC prompt). The shortcuts and Harbor.cmd then start the consoles from this folder.

The shipped profiles keep logs and registers relative to the module folder (logPath: .\Logs, registerPath: .\Register\safe-register.json). Under %ProgramFiles% a standard user cannot write there. Point them at a folder the account that runs the console can write. Add these fields to your profile in %ProgramData%\Harbor\environment.local.json. Both consoles read this file, so both then write their activity logs to that folder; Harbor Health also keeps its scan history there.

"logPath": "D:\\HarborData\\Logs",
"registerPath": "D:\\HarborData\\Register\\safe-register.json",
"accountRegisterPath": "D:\\HarborData\\Register\\account-register.json"

Then check with Test-HarborSetup: it tests that the log and register paths are writable.

Symptom Fix
-Scope AllUsers needs an elevated (Administrator) console. Start PowerShell with Run as administrator.
HTTPS setup needs an elevated step, and this copy of Harbor can be changed by a standard user You ran -SetupTls from a user-writable folder. Use option A or B.
A known residual: -SetupTls does not check the folder above the Harbor tree Install under %ProgramFiles%, whose parent folders only administrators can change. See Known limitations.

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