Technical Tip: Execute and deploy a script from the FortiCloud
Description
This article describes how to execute and deploy a CLI script from FortiGate Cloud.
Scope
FortiGate Cloud.
Solution
CLI command scripts can be configured on FortiGate Cloud to run on managed FortiGates on an ad hoc or scheduled basis.
Note:
Running CLI scripts is only available to FortiGates with the FortiGate Cloud Standard Subscription. Refer to Feature Comparison for the available features included with Basic and Standard subscriptions.
To create the CLI script:
- Log in to FortiGate Cloud.
- Select CLI Scripts -> Script List -> Create New.
- Enter the CLI commands and select OK to save.
The example below shows the CLI commands for enabling management access (SSH, Ping, HTTPS, SNMP) for the port2 interface.


To run the CLI script:
- Select CLI Scripts -> Script List -> Runnable Scripts -> Run.

-
Select the FortiGate. Only FortiGates with the Standard Subscription will show up in the list.
- Select Immediate to run the script immediately.
- Select Scheduled to configure the required time to run the script.

-
Log in to the FortiGate GUI to check the changes.
Before executing the script:
After executing the CLI script:
