Powershell Invoke WebRequest:基础连接已关闭:通过代理发送时发生意外错误

Powershell Invoke WebRequest:基础连接已关闭:通过代理发送时发生意外错误,powershell,invoke-webrequest,Powershell,Invoke Webrequest,错误: powershell版本4.0,此请求适用于更高版本的powershell 试图调用web请求 $headers=@{“授权”=“承载7jNQ0nL”} 调用WebRequest-Urihttps://api.line.me/v2/bot/user/all/richmenu -方法Get-Proxy Proxy.xx.xxxnet.com:8080-ProxyUseDefaultCredentials-Headers$Headers 但事实就是这样: Invoke-WebReques

错误:

powershell版本4.0,此请求适用于更高版本的powershell

试图调用web请求

$headers=@{“授权”=“承载7jNQ0nL”}
调用WebRequest-Urihttps://api.line.me/v2/bot/user/all/richmenu  -方法Get-Proxy Proxy.xx.xxxnet.com:8080-ProxyUseDefaultCredentials-Headers$Headers
但事实就是这样:

Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send

via : proxy 

我试图清理混乱的格式,但我不得不在几个地方猜测。请检查。另外,如果有代理,具体是什么类型的代理,如果你拿出代理,事情会发生吗?
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
At line:1 char:1
+ Invoke-WebRequest  -Uri https://api.line.me/v2/bot/user/all/richmenu  -Method Ge ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand