Skip to content

Invoke-PAMComplianceScan

Harbor OnboardNo sign-in neededGenerated from the codeDescribes Onboard 0.59.0

The scheduled-cadence compliance scan: runs the compliance report, writes a dated snapshot, diffs against the previous run and alerts on NEW drift only. Connects itself when no session is open (the profile’s declared service account and its declared secret source – zero prompts), so it runs headless from the scheduler as well as interactively.

Terminal window
Invoke-PAMComplianceScan [[-ConfigPath] <string>] [[-ConfigProfile] <string>] [-SkipDrift] [-WithHtml] [-NoNotify]

The alerting contract is deliberately quiet: a finding that already existed last run is UNCHANGED (no alert, however long it lingers), a finding that disappeared is RESOLVED (reported, never alerted), and only findings appearing for the FIRST time notify the webhook (event ‘compliance-new-drift’). The very first run is a BASELINE: it records the estate and never alerts, so enabling the schedule on a drifted estate does not blast the channel.

Snapshots live in <logPath>\compliance (newest N kept – per-profile compliance.snapshotKeep, default 60) and each embeds its diff, so the run history is self-describing.

G5 auto-remediation (OPT-IN, per-profile compliance.autoRemediate = { “enabled”: true, “maxSafesPerRun”: 5, “dryRun”: false }): after the diff, RBAC-drifted safes are repaired ADDITIVELY (Repair without -RemoveUnexpected: members are added or aligned, never removed), capped per run, never on the baseline and never without the drift audit. What happened is recorded in the result + snapshot (Remediation) and posted as webhook event ‘compliance-auto-remediated’.

Terminal window
Invoke-PAMComplianceScan -ConfigProfile prod

Not described in the module help.

Type Required Position Pipeline input
String No 0 No

Not described in the module help.

Type Required Position Pipeline input
String No 1 No

Suppress the webhook alert (diff is still computed + stored).

Type Required Position Pipeline input
SwitchParameter No Named No

Skip the slow member-by-member RBAC drift scan (rogue + registers only).

Type Required Position Pipeline input
SwitchParameter No Named No

Also write the branded HTML report next to the snapshot.

Type Required Position Pipeline input
SwitchParameter No Named No

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.