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 :
[ul]
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 !
Solved! Go to Solution.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
A new release of PowerFGT (0.40 is available on PSGallery => https://www.powershellgallery.com/packages/PowerFGT/
[ul]Documentation is available https://fortipower.github.io/PowerFGT/
Bug Report / Enhance : https://github.com/FortiPower/PowerFGT
Hello!!
Thank you!! it seems great!
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
A new release of PowerFGT (0.40 is available on PSGallery => https://www.powershellgallery.com/packages/PowerFGT/
[ul]Documentation is available https://fortipower.github.io/PowerFGT/
Bug Report / Enhance : https://github.com/FortiPower/PowerFGT
thanks for posting here too ! ;)
I'm proud to announce #PowerFGT 0.5.0 is available for download !! https://www.powershellgal...com/packages/PowerFGT/ What is it ?! it is a major release with more than 25 new cmdlets and Tests ! more than 300 Tests (Tested with macOS/Linux/Windows with FortiGate OS 6.0, 6.2 and 6.4) What New
[ul]Thanks to all contributors (Cédric, Arthur, Brett...) For the download => https://www.powershellgal...ackages/PowerFGT/0.5.0 For the release note => https://github.com/FortiP...GT/releases/tag/v0.5.0 For the documentation => [link]https://fortipower.github.io/PowerFGT/[/link]
olavoskarsen wrote:Hi, there is no yet Get for this but you can use
How to list user groups?
(Invoke-FGTRestMethod -uri api/v2/cmdb/user/group
For example :
(Invoke-FGTRestMethod -uri api/v2/cmdb/user/group).results | Format-Table
name q_origin_key id group-type authtimeout auth-concurrent-override auth-concurrent-value http-d
igest-
realm
---- ------------ -- ---------- ----------- ------------------------ --------------------- ------
RADIUS_Demo RADIUS_Demo 1 firewall 0 disable 0
SSO_Guest_Users SSO_Guest_Users 16777215 fsso-service 0 disable 0
Thank you alagoutte
PowerFGT is a grate tool.
is it possible to get lists users and groups?
Which users are members of which groups?
Like this?
olavoskarsen wrote:Hi,Thank you alagoutte
PowerFGT is a grate tool.
is it possible to get lists users and groups?
Which users are members of which groups?
Like this?
You don't have the info on the user API call, you need to make a loop for search on group member
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1705 | |
1093 | |
752 | |
446 | |
230 |
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 2024 Fortinet, Inc. All Rights Reserved.