Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
dtopoats
New Contributor

Fortimanager script syntax for multi vdom devices

Hello all... 

New to Fortinet and wanted to run some script syntax by the community. Need to implement some global settings on our Fgates via a FortManager script. Some of our gates are multi-vdom. So far I have this, below - have not tried it yet - just to see if I have it right before tripping over the syntax.  Thanks in advance! 

This would be for the multi vdom devices - l

config global
  config system global
    set admin-console-timeout 300
    set pre-login-banner enable
    set post-login-banner enable
    set admin-ssh-grace-time 60
    set admin-lockout-duration 300
    set admintimeout 5
    set admin-lockout-threshold 3
  next
  config system auto-install
    set auto-install-config disable
    set auto-install-image disable
  next

end

2 REPLIES 2
smkml
Staff
Staff

Hello @dtopoats ,

 

The configuration is good as long it able to install to FortiGate locally, it should be the same when using the scripts. Any typos or syntax error will cause it fail.

 

You may check below document for various example for the CLI scripts:

https://docs.fortinet.com/document/fortimanager/7.2.4/administration-guide/71780/cli-scripts 

 

dtopoats
New Contributor

Thanks smkml - actually took the "nexts" out - as those are not needed and will fail the script. Tested on a non multi-vdom unit - without the "config global" and it's fine. Will test a multi-vdom unit soon with what I have below

 

config global

  config system global
    set admin-console-timeout 300
    set pre-login-banner enable
    set post-login-banner enable
    set admin-ssh-grace-time 60
    set admin-lockout-duration 300
    set admintimeout 5
    set admin-lockout-threshold 3

end

config global
  config system auto-install
    set auto-install-config disable
    set auto-install-image disable

end

Labels
Top Kudoed Authors