Fortinet white logo
Fortinet white logo

Administration Guide

Import a script

Import a script

CLI scripts can be imported as text files from your local computer using the FortiManager GUI. See Importing CLI scripts

Tcl scripts can be imported using the FortiManager CLI using FTP or SCP. See Importing Tcl scripts

Importing CLI scripts
To import a CLI script:
  1. Go to Device Manager > Scripts.
  2. Select Import CLI Script from the toolbar. The Import CLI Script window opens.
  3. Drag and drop the script file onto the dialog box, or click Add Files and locate the file to be imported on your local computer.
  4. Click Import to import the script.

    If the script cannot be read, due to an incorrect file type or other issue, an error message will be displayed and the import process will be canceled.

To import a CLI script in the Global Database ADOM:
  1. Go to Policy & Objects > Object Configuration > Advanced > Scripts.
  2. Select Import from the toolbar. The Import Script dialog box opens.
  3. Enter a name for the script and, optionally, comments, in the requisite fields.
  4. Click Browse... and locate the file to be imported on your local computer.
  5. Click Import to import the script.

    If the script cannot be read, due to an incorrect file type or other issue, an error message will be displayed and the import process will be canceled.

Importing Tcl scripts

Tcl scripts can only be imported using the FortiManager CLI. Importing a Tcl script as a text file using the Import CLI Script function in the FortiManager GUI will import the script as CLI and it will not function correctly.

To import a Tcl script using the FortiManager CLI, enter the following command to import the script by FTP/SCP:

execute fmscript import {scp | ftp} <server> <finename> <username> <password> <scriptname> <TCL> <target> <comment> <adom_name> <os_type> <os_version> <platform> <devicename> <buildno> <hostname> <serial number>

Import a script

Import a script

CLI scripts can be imported as text files from your local computer using the FortiManager GUI. See Importing CLI scripts

Tcl scripts can be imported using the FortiManager CLI using FTP or SCP. See Importing Tcl scripts

Importing CLI scripts
To import a CLI script:
  1. Go to Device Manager > Scripts.
  2. Select Import CLI Script from the toolbar. The Import CLI Script window opens.
  3. Drag and drop the script file onto the dialog box, or click Add Files and locate the file to be imported on your local computer.
  4. Click Import to import the script.

    If the script cannot be read, due to an incorrect file type or other issue, an error message will be displayed and the import process will be canceled.

To import a CLI script in the Global Database ADOM:
  1. Go to Policy & Objects > Object Configuration > Advanced > Scripts.
  2. Select Import from the toolbar. The Import Script dialog box opens.
  3. Enter a name for the script and, optionally, comments, in the requisite fields.
  4. Click Browse... and locate the file to be imported on your local computer.
  5. Click Import to import the script.

    If the script cannot be read, due to an incorrect file type or other issue, an error message will be displayed and the import process will be canceled.

Importing Tcl scripts

Tcl scripts can only be imported using the FortiManager CLI. Importing a Tcl script as a text file using the Import CLI Script function in the FortiManager GUI will import the script as CLI and it will not function correctly.

To import a Tcl script using the FortiManager CLI, enter the following command to import the script by FTP/SCP:

execute fmscript import {scp | ftp} <server> <finename> <username> <password> <scriptname> <TCL> <target> <comment> <adom_name> <os_type> <os_version> <platform> <devicename> <buildno> <hostname> <serial number>