I'm new to using PowerShell and the LTM-REST module and a little help would be appreciated.
I'm getting this error when trying to connect to a F5 and get a list of the existing pools.
ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null.
At C:\windows\system32\windowspowershell\v1.0\Modules\F5-LTM\1.3.26\Public\Invoke-RestMethodOverride.ps1:36 char:50
+ ... $message = $_.ErrorDetails.Message | ConvertFrom-json | Selec ...
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidati NullNotAllowed,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
Invoke-RestMethodOverride : "404 Not Found:
At C:\windows\system32\windowspowershell\v1.0\Modules\F5-LTM\1.3.26\Public\Get-Pool.ps1:32 char:21
+ ... $JSON = Invoke-RestMethodOverride -Method Get -Uri $URI -Credenti ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-RestMethodOverride
And I am not positive whether I am even getting authenticated. This is the script being used:
$host_address = "IPAddress_of_F5_Appliance"
$user_id = "F5_Account_ID"
$secpasswd = "Pasword_Assigned_To_F5_Account_ID"
$secpasswd = ConvertTo-SecureString "Pasword_Assigned_To_F5_Account_ID" -AsPlainText -Force
$mycreds = New-Object System.Management.Automation.PSCredential ($user_id, $secpasswd)
New-F5session -LTMName $host_address -LTMCredentials $mycreds -PassThrough
Get-Pool | Select-Object -ExpandProperty fullPath ConvertFrom-Json
I'm running PowerShell v.5
Thanks.