CLI scripts
You can configure and schedule scripts of CLI commands to run on your FortiGates. For FortiOS CLI command information, see the FortiOS CLI Reference.
To create a script:
- Go to CLI scripts > Script list.
- Click Create new.
- In the CLI script field, enter the desired FortiOS CLI commands to run on the FortiGates.
- Configure other fields as desired, then click OK.
To run a script:
- Go to CLI scripts > Script list. Select the desired script, then click Run.
- In FortiGates, select the desired FortiGates.
- In the Execution schedule toggle, select one of the following:
- To run the script immediately, click Immediate.
- To schedule the script to run at a desired time, select Scheduled. Configure the desired time to run the script. Click OK.
You can view and edit scheduled script runs in CLI Scripts > Script tasks > Scheduled scripts. You can view the script run results in CLI scripts > Script tasks > Run results.