Test-PAMAuditLog
Verifies the tamper-evident hash chain of a day’s JSONL activity log: proves no entry was altered, removed or inserted since it was written.
Syntax
Section titled “Syntax”Test-PAMAuditLog [[-Date] <string>] [[-ConfigPath] <string>] [[-ConfigProfile] <string>]Description
Section titled “Description”Walks harbor-<date>.jsonl and re-computes each chained entry’s SHA-256 (via the same canonical form the writer used). Reports:
- a hash mismatch -> the entry’s content was ALTERED,
- a broken prevHash link -> an entry was REMOVED or REORDERED,
- a sequence gap -> an entry was REMOVED,
- a mid-file chain restart -> the file was TRUNCATED and restarted.
Lines written before the chain existed (no hash fields) are counted as Unchained – legacy, not failures. Works offline; no session needed.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Test-PAMAuditLog # today's logExample 2
Section titled “Example 2”Test-PAMAuditLog -Date 20260715Parameters
Section titled “Parameters”-ConfigPath
Section titled “-ConfigPath”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 1 | No |
-ConfigProfile
Section titled “-ConfigProfile”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 2 | No |
Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | 0 | No |
Default: (Get-Date).ToString('yyyyMMdd').
This command also accepts the PowerShell common parameters (-Verbose, -ErrorAction, and so on).
See also
Section titled “See also”- All Harbor Onboard cmdlets
- In PowerShell:
Get-Help Test-PAMAuditLog -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
