execute : factoryreset2
 
factoryreset2
Reset the FortiGate configuration to factory default settings except VDOM and interface settings.
Syntax
execute factoryreset2 [keepvmlicense]
If keepvmlicense is specified (VM models only), the VM license is retained after reset.