Skip to content

set commands ‐ produce PAN‐OS "set commands" for manipulated XML configuration files

Sven Waschkut edited this page Sep 12, 2023 · 3 revisions

PAN-OS-PHP can manipulate Panorama / Firewall / Strata Cloud Manager configuration with predefined utilities mentioned on this Github Repository

To produce PAN-OS "set commands", for example for the task to remove duplicate address objects for a Panorama XML offline configuration file:

pan-os-php type=address-merger in=input-config.xml out=address-merged.xml location=any allowmergingwithupperlevel exportcsv=address_merged.html outputformatset=set-commands.txt | tee address-merger-log.txt

PAN-OS set commands for the manipulated XML config file can be found in set-commands.txt


There are two ways to upload these "set commands" to your Palo Alto Networks Panorama or Firewall device:

  1. SSH access - copy & past [past all commands within single step - without validation and error responses]
  • login via SSH
  • set cli scripting-mode on
  • configure
  • [copy & past all set commands from the set-commands.txt file from above]

//second option is right now under BUG validation [bugfix will be done with v2.1.17]

  1. safe mode to upload set commands via script including error response
  • pan-os-php type=ssh-connector in={USER}@{MGMT-IP} setcommand-file=set-commands.txt setcommand-maxlinecount=300 out=ssh-connector_log.txt timeout=5