PowerFMG: a PowerShell module for FortiManager

New Member
  • Total Posts : 10
  • Scores: 2
  • Reward points: 0
  • Joined: 2015/05/26 00:42:41
  • Status: offline
2021/07/22 03:07:16 (permalink)

PowerFMG: a PowerShell module for FortiManager


I have been working for several months on a PowerShell module that uses the FortiManager REST API.

This module is available on psgallery(.com) : https://www.powershellgallery.com/packages/PowerFMG

Actually, we support to connect to HTTPS or HTTP

and use the following feature :

  •     Address (Get/Add/Copy/Set/Remove object type ipmask/subnet)

it is very easy to use (and install)

Launch PowerShell command line and launch following command for install

Install-Module PowerFMG

for load the module

Import-Module PowerFMG

Connect to your FortiManager


You get a prompt to ask credential (you need to enable JSON API this issue, look doc for more info)

for example to get all address use


You can get the list of command available via

Get-Command -Module PowerFMG

 and for get help (and example about a command for example Add-FMGFirewallAddress)

Get-Help Add-FMGFirewallAddress -Full

More documentation, example is available on https://github.com/FortiPower/PowerFMG  and you can also report issue/enhance !
Jump to:
© 2021 APG vNext Commercial Version 5.5