Description | This article describes the permissions required to run PowerShell Script and get the backup configuration file on FortiGate using HTTPS RestAPI calls. |
Scope | FortiGate v7.x. |
Solution |
2. Create a RestAPI user:
In the end, make this user member of the above admin profiles (In this example: 'Backup Permissions').
3. After setting up a user with proper permissions, create a PowerShell script: On a notepad copy and paste the below text, but replace bold values with the setup values.
$FGFQDN = "192.168.1.99" # # Fortigate IP Address #If you have problems with certificate trust / or Self Signed Certificate is used Set to True if ($IgnoreCertCheck){ clear-host Try{ If ($Response.Length -gt 10){ $error[0]"
Save this file with the extension .ps1.
4. From a Powershell window, it is possible to run it and get the backup:
|
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.