On occasion, I have found that I have the need to not only wipe a Fortinet Fortigate Firewall’s configuration, settings, and logs, but to actually verify that the contents of the logs were wiped out. The script below will allow you to do this.
I would recommend using PuTTY with logging enabled to document your progress. With some modification this may work on other Fortinet devices. Note that you will have to modify the script to add any custom VDOMs you may have on your device.
I would highly recommend backing up your configuration and any logs that you need to retain, as I know of no way to undo this. Use the following script at your own risk!
#-------------------------------# #Fortinet Device wipe - Supports CTAP Units #Version: 1.02 #Update: 2018-11-06 #Notes: For systems without VDOMs enabled, #the config lines will produce an error, however
Continue reading Wipe a Fortinet FortiGate Firewall – Delete All Logs and Configuration – Script