FortiManager
FortiManager supports network operations use cases for centralized management, best practices compliance, and workflow automation to provide better protection against breaches.
smkml
Staff
Staff
Article Id 360772
Description

 

This article describes how to edit policies in Policy Package using a script, which does not edit it per policies from GUI.

 

Scope

 

FortiManager.

 

Solution

 

  1. Print out the policy package where the policies are located using the command below:

 

FMG# execute fmpolicy print-adom-package <adom-id> 1 <policy-package id> 181 all

 

Example: execute fmpolicy print-adom-package 173 1 10842 181 all

 

In GUI:

 

pp in GUI.png

 

Printed out using the suggested command and download it as a text file:

 

print pp using CLI.gif

 

Note: Select the 'Bin/Garbage' icon to remove all unnecessary output before entering the command to get a clean output.

 

  1. Edit the policies in the text file. 

     

    edit policies in text file.gif

     

  2. Create a Script in Device Manager where to run the script on Policy Package or ADOM Database, and copy all the related policies configuration from the text file into it.

     

    copy to script.gif

     

  3. Run the script to the specific policy package where the policy is located.

     

    run script in adom database.gif

     

  4. Check and confirm on the policy package the changes take place from the GUI.

     

 

after run script.png

Related article:

Technical Tip: CLI Script behavior to run in FortiManager