The same command on many devices
Sometimes no template covers a setting, or you need a one-time change on twenty devices. A scriptis a list of FortiOS commands that FortiManager runs on the devices you choose.
Choose the run target
On small screens, swipe sideways or focus the diagram and use the arrow keys.
- Device database stages the change in FortiManager. You see it as Modified, preview it and install it with the rest.
- Policy package or ADOM database applies to the objects and policies FortiManager holds.
- Remote FortiGate directly runs on the device now. Use it when you need an immediate effect and accept that the change is applied at once.
config system dns
set primary 198.51.100.53
set secondary 198.51.100.54
endA small CLI script. Run it against the device database for two lab devices first, check the install preview, then install.
Test on one device first
Script history
FortiManager records each run, the devices it touched and whether it succeeded. Use it to answer the question "what changed on FGT2 last Tuesday" and keep it with your change records.
Check your understanding
You want to review a script's effect before it reaches the FortiGate. Which target?
A script run directly on the remote FortiGate fails halfway. What is the risk?
Which is better for a setting that must stay consistent over time?