小编Sra*_*uru的帖子

“Invoke-WebRequest:底层连接已关闭:意外错误

以下是我的自定义脚本扩展中的代码

$AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols
Invoke-WebRequest -Uri https://aka.ms/downloadazcopy-v10-windows -OutFile $env:C:\temp\azcopy.zip
Run Code Online (Sandbox Code Playgroud)

当我运行自定义脚本扩展时,出现以下错误

"Invoke-WebRequest : The underlying connection was closed: An unexpected error
Run Code Online (Sandbox Code Playgroud)

关于如何解决它有任何帮助吗?

.net powershell azure

2
推荐指数
1
解决办法
5449
查看次数

标签 统计

.net ×1

azure ×1

powershell ×1