Working with Scripts : Script view
 
Script view
You can use the Device Manager script repository to add, clone, edit, delete, and export scripts. You can also execute CLI scripts on the global database and view the results of running the script.
To view the list of scripts, go to Device Manager > Tools > Script.
 
The tools menu will only be visible if Show Device Manager Tools has been enabled in the administrator settings. See “Configuring global admin settings”.
You can select CLI Script, CLI Script Group, or TCL Script. CLI scripts only allow you to use Fortinet CLI commands in your script. TCL scripts allow you to use TCL scripting language commands which can include CLI commands as well. CLI Script Group is grouping some scripts together that will be run, making it easier to schedule multiple scripts at one time.
When you are creating, editing, or deleting scripts you are working in the Script Repository.
Figure 154: CLI script repository
Import
Select to import a script.
The script will be imported from a plain text file on your local computer.
Create New
Select to create a new script. For more information, see “Creating or editing a script”.
ID
The ID assigned to this script.
Name
The name of the script.
The script name can include spaces, but cannot include punctuation.
Description
A brief description of the script.
Delete icon
Select this icon to delete this script.
If this icon does not appear, the script is in use and cannot be deleted at this time. Generally this indicates the script has been scheduled to run on a device at a later date.
Edit icon
Select to view or change the script information.
Clone icon
Select to create a duplicate of this script with another name. For more information, see “Cloning a script”.
Export icon
Export a script in the form of a text file that you can download to your PC. The default name of the file is script.txt.
Run script now icon
Select to run this script on the FortiManager global database.
Only CLI scripts can be run on the global database, and the CLI commands must be the full command, no short forms.
View Log icon
Select to view the log of this script running on the global database. Select Return to come back to this screen when done.