Compare-PAMSafePermissions
RBAC drift report: compares a safe’s ACTUAL members and permissions in the vault against what the rbac-map says they SHOULD be.
Syntax
Section titled “Syntax”Parameter set One (default):
Compare-PAMSafePermissions [-SafeName] <string> [-IgnoreMembers <string[]>] [-ConfigPath <string>] [-ConfigProfile <string>]Parameter set All:
Compare-PAMSafePermissions -All [-IgnoreMembers <string[]>] [-ConfigPath <string>] [-ConfigProfile <string>]Description
Section titled “Description”The expected state is derived the same way New-PAMSafe applies it: the safe type is resolved from the name, persona group names from the groupNaming pattern, permissions from rbac-map.json. Differences are reported as: MissingMembers expected on the safe but not present UnexpectedMembers present but not part of the standard (after the ignore list – built-in CyberArk users/groups and the connecting service user are always ignored) PermissionDrift per member: permissions to add / remove ‘OPT’ permissions (retrieveAccounts on managed types) are excluded from the strict diff because either value can be intentional; they are listed separately as OptPermissions for review. Personal safes compare the global admin groups only (the individual owner cannot be derived from the name). Governed naming exceptions: a TYPED exception (declared safeType in the register) is audited like any safe – expected group names derive from the raw name via the pattern’s {SafeName} token (rows carry NameException = true). UNTYPED exceptions are drift-exempt: skipped by -All, and an explicit -SafeName query returns an explanatory row.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Compare-PAMSafePermissions -SafeName AB-ABC-SRV-WIN-DA-I-M-PExample 2
Section titled “Example 2”Compare-PAMSafePermissions -All | Where-Object { -not $_.InCompliance }Parameters
Section titled “Parameters”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
SwitchParameter |
Yes | Named | No |
-ConfigPath
Section titled “-ConfigPath”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
-ConfigProfile
Section titled “-ConfigProfile”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
No | Named | No |
-IgnoreMembers
Section titled “-IgnoreMembers”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String[] |
No | Named | No |
Default: @().
-SafeName
Section titled “-SafeName”Not described in the module help.
| Type | Required | Position | Pipeline input |
|---|---|---|---|
String |
Yes | 0 | No |
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 Compare-PAMSafePermissions -Full
Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.
