First run¶
This walkthrough uses an offline config export (panorama.xml). Every command
works identically against a live profile — see Live vs offline.
1. Is this IP already an object?¶
You'll see every matching object: exact matches, broader objects that
contain the IP (e.g. a /24), narrower objects within a queried range,
and the address-groups that carry them.
Pipe it to an agent or jq with JSON:
2. Find duplicates¶
Each row is a set of objects that mean the same thing under different names.
3. Preview a merge (dry-run)¶
Nothing changes. You see exactly which groups and rules would be rewritten and in what order. Want the PAN-OS commands instead?
4. Apply it¶
Offline, write the cleaned config to a new file (never the source export):
Load fixed.xml into Panorama (load config partial or the GUI), review the
candidate, and commit.
Against a live profile, --apply (no --out) pushes the plan straight to
Panorama's candidate config — psc never commits, so you still review and
commit yourself:
5. Audit hygiene¶
$ psc -c panorama.xml refs unused --kind address
$ psc -c panorama.xml refs dangling
$ psc -c panorama.xml name lint
That's the loop: find → preview → apply → audit. Read
Writes and safety before you --apply against anything
you care about.