正如你所看到的curl -xget在PS 7。2和cmd中工作得很好,但在PS 5。1中给出了一个错误。
Invoke-WebRequest:找不到匹配参数名称'xget'的参数。
我哪里做错了?
###当你打电话时curl
in cmd and PowerShell Core在cmd和PowerShell Core中,它正在调用可执行文件%SYSTEMROOT%\System32\curl.exe
while in PowerShell Desktop it is calling the Invoke-而在PowerShell Desktop中,它正在调用
Invoke-WebRequest
command which does not have the xgetxget
parameter
如果你想在PowerShell中使用xget,你必须使用curl。exe命令
# # #
-X ≈ --request
-x ≈ --proxy
也许你应该在-XGET中使用大写字母。