Creating Script Files; Uploading Script Files - Fortinet FortiGate Series Administration Manual

Hide thumbs Also See for FortiGate Series:
Table of Contents

Advertisement

System Maintenance

Creating script files

Uploading script files

FortiGate Version 4.0 MR1 Administration Guide
01-410-89802-20090903
http://docs.fortinet.com/
Feedback
Script Execution History
(past 10 scripts)
Name
Type
Time
Status
Delete icon
Script files are text files with CLI command sequences. When a script file is uploaded to a
FortiGate unit, the commands are executed in sequence.
To create a script file
1 Open a text editor application. Notepad on Windows, GEdit on Linux, Textedit on the
Mac, or any editor that will save plain text can create a script file.
2 Enter the CLI commands you want to run.
The commands must be entered in sequence, with one command per line.
3 Save the file to your maintenance PC.
Tip: An unencrypted configuration file uses the same structure and syntax as a script file.
You can save a configuration file and copy the required parts to a new file, making any edits
you require. You can generate script files more quickly this way.
After you have created a script file, you can then upload it through System >
Maintenance > Scripts. When a script is uploaded, it is automatically executed.
Caution: Commands that require the FortiGate unit to reboot when entered on the
command line will also force a reboot if included in a script.
To execute a script
1 Go to System > Maintenance > Scripts.
2 Verify that Upload Bulk CLI Command File is selected.
3 Select Browse to locate the script file.
4 Select Apply.
If the FortiGate unit is not configured for remote management, or if it is configured to use a
FortiManager unit, uploaded scripts are discarded after execution. Save script files to your
management PC if you want to execute them again later.
If the FortiGate unit is configured to use the FortiGuard Analysis & Management Service,
the script file is saved to the remote server for later reuse. You can view the script or run it
from the FortiGuard Analysis & Management Service portal web site. For more
information about viewing or running an uploaded script on the portal web site, see the
FortiGuard Analysis & Management Service Users
A list of the 10 most recently executed scripts.
The name of the script file.
The source of the script file. A local file is uploaded directly to the
FortiGate unit from the management PC and executed. A remote file
is executed on the FortiGate unit after being sent from a FortiManager
unit or the FortiGuard Analysis & Management Service.
The date and time the script file was executed.
The status of the script file, if its execution succeeded or failed.
Delete the script entry from the list.
Guide.
Using script files
321

Advertisement

Table of Contents
loading

Table of Contents