Hot!PowerFGT: a PowerShell module for FortiGate

Author
alagoutte
New Member
  • Total Posts : 4
  • Scores: 0
  • Reward points: 0
  • Joined: 2015/05/26 00:42:41
  • Status: offline
2019/05/17 09:50:02 (permalink)
0

PowerFGT: a PowerShell module for FortiGate

Hi,
I have been working for several months on a PowerShell module that uses the FortiGate REST API.
 
This module is available on psgallery(.com) : https://www.powershellgallery.com/packages/PowerFGT
Actually, we support to connect to HTTPS or HTTP
and use the following feature :
  • Address (Get/Add/Copy/Set/Remove object type ipmask/subnet)
  • AddressGroup (Get)
  • DNS (Get)
  • HA (Get)
  • Interface (Get)
  • IP Pool (Get)
  • Local User (Get)
  • Policy (Get)
  • RoutePolicy (Get)
  • Service (Get)
  • Service Group (Get)
  • Static Route (Get)
  • System Global (Get)
  • VDOM (Get)
  • Virtual IP (Get)
  • Virtual WAN Link/SD-WAN (Get)
  • VPN IPsec Phase 1/Phase 2 Interface (Get)
  • Zone (Get)
  • Multi Connection
 
it is very easy to use (and install)
 
Launch PowerShell command line and launch following command for install
Install-Module PowerFGT



for load the module
Import-Module PowerFGT

Connect to your firewall
Connect-FGT 192.0.2.1

You get a prompt to ask credential
 
for example to get all address use
Get-FGTFirewallAddress

You can get the list of command available via
Get-Command -Module PowerFGT

 
 and for get help (and example about a command for example Add-FGTFirewallAddress)
Get-Help Add-FGTFirewallAddress -Full

 
More documentation, example is available on https://github.com/FortiPower/PowerFGT and you can also report issue/enhance !
 
post edited by alagoutte - 2019/05/17 09:51:30
#1

2 Replies Related Threads

    Iescudero
    Silver Member
    • Total Posts : 107
    • Scores: 8
    • Reward points: 0
    • Joined: 2015/01/21 13:34:23
    • Location: Buenos Aires, Argentina
    • Status: offline
    Re: PowerFGT: a PowerShell module for FortiGate 2019/05/28 11:17:32 (permalink)
    0
    Hello!!
     
    Thank you!! it seems great!
    #2
    thedude78
    New Member
    • Total Posts : 1
    • Scores: 0
    • Reward points: 0
    • Joined: 2019/07/08 11:11:31
    • Status: offline
    Re: PowerFGT: a PowerShell module for FortiGate 2019/07/08 11:15:47 (permalink)
    0
    Going to check this out.  I was looking at building some scripts of my own to use the api, but the functionality might already exist here.
     
    Thanks
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 5.5