PowerShell module for the F5 LTM REST API
Problem this snippet solves: To report an issue with the F5-LTM or F5-BIGIP modules, please use the Issues sections of the GitHub repos (here and here) instead of commenting here. Thanks!
This Pow...
Updated Jun 06, 2023
Version 2.0Joel_Newton
Cirrus
Joined September 06, 2012
Mayur_Kirtani_3
Feb 09, 2017Nimbostratus
Do I need special permissions in F5 to be able to run PS commands?
I am able to get a session
PS C:\Windows\system32> $F5session = New-F5Session -LTMName 192.168.XXX.XXX -LTMCredentials $mycredentials -Passthrough
PS C:\Windows\system32> $F5session
Name
BaseURL
WebSession
----
-------
----------
192.168.XXX.XXX
https://192.168.XXX.XXX/mgmt/tm/ltm/
Microsoft.PowerShell.Commands.WebReq...
but when I try get-pool, i get this
PS C:\Windows\system32> Get-Pool $F5session
Invoke-RestMethodOverride : "401 F5 Authorization Required: Authorization failed:
user=https://localhost/mgmt/shared/authz/users/Mayur.Kirtani resource=/mgmt/tm/ltm/pool verb=GET
uri:http://localhost:8100/mgmt/tm/ltm/pool/ referrer:10.XXX.XXX.XXX sender:10.XXX.XXX.XXX
At C:\windows\system32\windowspowershell\v1.0\Modules\F5-LTM\Public\Get-Pool.ps1:32 char:21
+ $JSON = Invoke-RestMethodOverride -Method Get -Uri $URI -WebSession ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-RestMethodOverride
am i missing something?
thanks M