Working with Scripts : Script samples : TCL scripts : Limitations of FortiManager TCL
 
Limitations of FortiManager TCL
FortiManager TCL executes in a controlled environment. You do not have to know the location of the TCL interpreter or environment variables to execute your scripts. This also means some of the commands normally found in TCL are not used in FortiManager TCL. For more information on the limitations of FortiManager TCL, see your Release Notes, and the Knowledge Base.
Depending on the CLI commands you use in your TCL scripts, you may not be able to run some scripts on some versions of FortiOS as CLI commands change periodically.
 
Before testing a new script on a FortiGate device, you should backup that device’s configuration and data to ensure it is not lost if the script does not work as expected.