There is no error in creating a session. Right after the New-F5Session command, it says that base URL is https://[IP]/mgmt/tm/ltm which is different to our f5 website (https://[IP]/xui/)
Then I try Get-Pool [pool name] and get the error below. A window will also pop-up for credentials so I guess it wasn't able to get the session eventhough I use -PassThrough
Test-F5Session : You must either create an F5 Session with script scope (by calling New-F5Session) or pass an F5 session
At C:\PowerShell\Modules\F5-LTM\Public\Get-Pool.ps1:25 char:9
+ Test-F5Session($F5Session)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Test-F5Session
ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null.
At C:\PowerShell\Modules\F5-LTM\Public\Invoke-RestMethodOverride.ps1:36 char:50
+ $message = $_.ErrorDetails.Message | ConvertFrom-json | Select-Objec ...
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertFromJs
Invoke-RestMethodOverride : " :
At C:\PowerShell\Modules\F5-LTM\Public\Get-Pool.ps1:32 char:21
+ $JSON = Invoke-RestMethodOverride -Method Get -Uri $URI -Credential ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-RestMethodOverride