Chapter 10 Install and System Administration for FortiOS 5.0 : Advanced concepts : CLI Scripts : Uploading script files
  
Uploading script files
After you have created a script file, you can then upload it through System > Config > Advanced. When a script is uploaded, it is automatically executed.
Commands that require the FortiGate unit to reboot when entered in the command line will also force a reboot if included in a script.
To execute a script
1. Go to System > Config > Advanced.
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 and 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 and Management Service portal web site.
See Also
CLI Scripts