Forum Discussion
Troubleshooting Invoke-RestMethod API call.
Hi Experts, In one of my scenario i am trying to remove iRule from virtual server by calling "Remove-iRuleFromVirtualServer.ps1" which is internally calling below somewhere.
$Result = Invoke-RestMethod @PSBoundParameters but this is throwing me an exception as below and I am not sure where exactly to look into.
Invoke-RestMethod : {"code":400,"message":"\"virtual\" unexpected argument","errorStack":[],"apiError":26214401} At C:\Users\mitesh.neema\Documents\WorkingPSStructure_Copy\Invoke-F5RestMethod.ps1:30 char:19 + $Result = Invoke-RestMethod @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Actual file can be found here:
https://github.com/joel74/POSH-LTM-Rest/blob/master/F5-LTM/Public/Invoke-RestMethodOverride.ps1L26
Notice line number26.
Any help
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com