Powershell命令Invoke-WebRequest缺少参数

时间:2020-03-16 19:32:57

标签: powershell windows-10

我正在尝试使用Powershell将带有非标准HTTP动词的Web请求发送到API。根据{{​​3}},似乎有一个选项可以使用-CustomMethod实现,但是当我运行它时出现错误:

A parameter cannot be found that matches parameter name 'CustomMethod'.

完整命令:iwr $Url -UseBasicParsing -CustomMethod $Verb

我的powershell版本:5.1.18362.628

在发布此问题后再次阅读MSDN,它提到在Powershell版本6中添加了此参数。是否可以通过早期版本的Powershell实现此目的?

0 个答案:

没有答案