Open palakd38 opened 1 week ago
What do you have with -verbose ?
What also FMG release ?
Getting the same with verbose as well: PS C:\WINDOWS\system32> Get-FMGFirewallAddress | Format-Table -verbose Unable to use FortiManager API (-6) Invalid url At C:\Program Files\WindowsPowerShell\Modules\PowerFMG\0.1.0\Private\RestMethod.ps1:184 char:13
+ CategoryInfo : OperationStopped: (Unable to use F...-6) Invalid url:String) [], RuntimeException
+ FullyQualifiedErrorId : Unable to use FortiManager API (-6) Invalid url
With the release if you mean version:
Platform Full Name : FortiManager-VM64 Platform Type : FMG-VM64 Release Version Information : (GA) Serial Number : FMG-VMTM20003464 TZ : Europe/Amsterdam Time Zone : (GMT+1:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna. Version : v7.4.3-build2487 240514 (GA)
What powershell release ? (Do you have try with PS 7 ?)
What do you use cmdlet for connect-FMG ?
i can’t try for the moment but I will try next week
Actually it is working nowhere. I tried in powershell 5 and PS7, nowhere it worked.
I for cmdlet powershell and the same tried in vscode also, nowhere worked.
Was working till monday actually.
-verbose need to be set for get-FMGFirewallAdress ( and not Format-Table)
With verbose:
PS C:\Users\z004m7hu> Get-FMGFirewallAddress -verbose
VERBOSE: {
"params": [
{
"url": "pm/config/adom/wurmloch/obj/firewall/address"
}
],
"verbose": 1,
"session": "HFDAMLWLMabp+538kBWdFAEIsNjG5Kc+QFaEFqLl4YBbUr4mWf/F+bvgyvvsGx9hsaFCHCvJ1uKFxqiKdnh9jA==",
"method": "get",
"id": 4
}
VERBOSE: Requested HTTP/1.1 POST with 202-byte payload
VERBOSE: Received HTTP/1.1 response of content type application/json of unknown size
VERBOSE: Content encoding: utf-8
Exception: C:\Users\z004m7hu\Documents\PowerShell\Modules\PowerFMG\0.1.0\Private\RestMethod.ps1:184
Line |
184 | throw "Unable to use FortiManager API (" + $response.resu …
| ~~~~~~~~~~~~~
| Unable to use FortiManager API (-6) Invalid url
I am getting connected to the specific adom. But when I am trying to fetch all the FirewalAddress is also not working, getting the following:
PS C:\WINDOWS\system32> Get-FMGFirewallAddress -connection $fmgConnect | Format-Table Unable to use FortiManager API (-6) Invalid url At C:\Program Files\WindowsPowerShell\Modules\PowerFMG\0.1.0\Private\RestMethod.ps1:184 char:13