Technical Tip: TAC debug script with PowerShell
| Description | This article describes how to use a PowerShell script to help collect diagnostic information from a FortiGate firewall for Fortinet TAC analysis without installing any third-party application.
It is commonly used when:
| ||||||||||||||||||||
| Scope | FortiGate. | ||||||||||||||||||||
| Solution | The script will connect to the FortiGate using SSH to run a predefined set of diagnostic commands and repeat the collection multiple times if requested, then save all output to log files on the Windows PC. Once the script stops at the end of the loop, it will automatically package the logs into a ZIP file, which can be uploaded to a TAC ticket.
While running, the script displays live status messages to show progress in real time, as below:
System requirements:
Configuration file (config.txt): This file controls what the script collects.
Example:
host = 10.56.1.126
Config settings explained:
Any line without an '=' sign is treated as a FortiGate CLI command and will be executed.
How to run:
|

