Fortinet black logo

Administration Guide

Add a script

Add a script

To add a script to an ADOM:
  1. Go to Device Manager > Scripts, or Policy & Objects > Object Configurations > Scripts for the Global Database ADOM.
  2. Click Create New, or right-click anywhere in the script list and select New from the menu. The Create Script dialog box.

  3. Enter the required information, then select OK to create the new script.

    Script Name

    Type a unique name for the script.

    View Sample Script

    This option points to the FortiManager online help.

    Comments

    Optionally, type a comment for the script.

    Type

    Specify the type of script.

    This option is not available for Global Database ADOM scripts.

    Run Script on

    Select the script target. This settings will affect the options presented when you go to run a script. The options include:

    • Device Database
    • Policy Package or ADOM Database
    • Remote FortiGate Directly (via CLI)

    For Global Database ADOM scripts, this option is set to Policy Package or ADOM Database and cannot be changed.

    Script Detail

    Type the script itself, either manually using a keyboard, or by copying and pasting from another editor.

    Advanced Device Filters

    Select to adjust the advanced filters for the script. The options include:

    • Platform (select from the dropdown list)
    • Build
    • Device (select from the dropdown list)
    • Host name
    • SN

    These options are not available for Global Database ADOM scripts, or if Run script on is set to Policy Package or ADOM Database.

Add a script

To add a script to an ADOM:
  1. Go to Device Manager > Scripts, or Policy & Objects > Object Configurations > Scripts for the Global Database ADOM.
  2. Click Create New, or right-click anywhere in the script list and select New from the menu. The Create Script dialog box.

  3. Enter the required information, then select OK to create the new script.

    Script Name

    Type a unique name for the script.

    View Sample Script

    This option points to the FortiManager online help.

    Comments

    Optionally, type a comment for the script.

    Type

    Specify the type of script.

    This option is not available for Global Database ADOM scripts.

    Run Script on

    Select the script target. This settings will affect the options presented when you go to run a script. The options include:

    • Device Database
    • Policy Package or ADOM Database
    • Remote FortiGate Directly (via CLI)

    For Global Database ADOM scripts, this option is set to Policy Package or ADOM Database and cannot be changed.

    Script Detail

    Type the script itself, either manually using a keyboard, or by copying and pasting from another editor.

    Advanced Device Filters

    Select to adjust the advanced filters for the script. The options include:

    • Platform (select from the dropdown list)
    • Build
    • Device (select from the dropdown list)
    • Host name
    • SN

    These options are not available for Global Database ADOM scripts, or if Run script on is set to Policy Package or ADOM Database.