当前位置:网站首页>The request was aborted: Could not create SSL/TLS secure channel.
The request was aborted: Could not create SSL/TLS secure channel.
2022-06-24 03:26:00 【shawyang】
invoke-webrequest One url An error occurs when getting a file invoke-webrequest : The request was aborted: Could not create SSL/TLS secure channel.
invoke-webrequest "http://www.7-zip.org/a/7z1900-x64.msi" -outfile "c:\7z1900.msi"
【 Temporary solutions 】
powershell perform
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
【 Radical approach 】
Through the registry to achieve , Save the following code as tls1.2_on.reg, Double click the point “ yes ” After import , And on again powershell perform [Net.ServicePointManager]::SecurityProtocol Will show SystemDefault, In this way, it will be closed later powershell There will be no problem opening it
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
【 process analysis 】
server2016 On the system powershell An error is reported when you execute this command The request was aborted: Could not create SSL/TLS secure channel.
invoke-webrequest "http://www.7-zip.org/a/7z1900-x64.msi" -outfile "c:\7z1900.msi"
server 2016 powershell function [Net.ServicePointManager]::SecurityProtocol Check to see if Tls12.
at present Tls12(tls1.2,powershell If enabled , Will be displayed Tls12) It's mainstream ,IE Browsers do not support less than Tls12 Of https Visited , Access some directly without modification URL Will be submitted to the SSL/TLS dependent error msg.
server 2016 It needs to be transformed in the following way ,server 2019 Of powershell Default already tls1.2, No need to change .
https://docs.microsoft.com/zh-cn/powershell/module/powershellget/?view=powershell-7
As of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. If you are not using TLS 1.2 or higher, you will receive an error when trying to access the PowerShell Gallery. Use the following command to ensure you are using TLS 1.2:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
For more information, see the announcement in the PowerShell blog.
powershell Internal execution [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Just a temporary measure , close powershell Open it next time powershell It's still old Ssl3, Tls. The permanent solution is through the registry , As stated above .
It's solved tls1.2 And then visit invoke-webrequest "http://www.7-zip.org/a/7z1900-x64.msi" -outfile "c:\7z1900.msi" I won't make a mistake , success get To the file .
边栏推荐
- What protocols do fortress computers have and what protocols do fortress computers generally use
- 14. Tencent cloud IOT device side learning - data template application development
- [competition experience sharing] design of intelligent guide rod
- Tencent Mu Lei: real scene 3D linking industrial Internet and consumer Internet
- What is the price of the elastic public network IP bandwidth
- Windowsvpn client is coveted by vulnerabilities, 53% of companies face supply chain attacks | global network security hotspot
- Highlights of future cloud native CIF Forum
- Lua language development, esp8266 access to Bafa cloud, mqtt and TCP protocols
- Grpc: how to add API Prometheus monitoring interceptors / Middleware?
- How to pair cloud game servers? Is the cloud game server expensive?
猜你喜欢

Community pycharm installation visual database
![[51nod] 3216 Awards](/img/94/fdb32434d1343040d711c76568b281.jpg)
[51nod] 3216 Awards

QT creator tips
![[51nod] 2106 an odd number times](/img/af/59b441420aa4f12fd50f5062a83fae.jpg)
[51nod] 2106 an odd number times
![[summary of interview questions] zj5](/img/d8/ece82f8b2479adb948ba706f6f5039.jpg)
[summary of interview questions] zj5
![[51nod] 3047 displacement operation](/img/cb/9380337adbc09c54a5b984cab7d3b8.jpg)
[51nod] 3047 displacement operation
![[51nod] 2102 or minus and](/img/68/0d966b0322ac1517dd2800234d386d.jpg)
[51nod] 2102 or minus and

On Sunday, I rolled up the uni app "uview excellent UI framework"
![[51nod] 3395 n-bit gray code](/img/b5/2c072a11601de82cb92ade94672ecd.jpg)
[51nod] 3395 n-bit gray code
![[summary of interview questions] zj6 redis](/img/4b/eadf66ca8d834f049f3546d348fa32.jpg)
[summary of interview questions] zj6 redis
随机推荐
What is load balancing? What are the functions of load balancing?
Why can't the fortress machine open the port? There is a problem with the use of the fortress machine port
[51nod] 3047 displacement operation
Is it necessary to buy EIP? Price analysis of EIP
Tencent Mu Lei: real scene 3D linking industrial Internet and consumer Internet
Why do cloud desktops use rack servers? Why choose cloud desktop?
Go program lifecycle
What is the all-in-one backup machine? How about its cost performance
[summary of interview questions] zj5
14. Tencent cloud IOT device side learning - data template application development
What is distributed configuration center Nacos? What are the functions of distributed configuration center Nacos?
General scheme for improving reading and writing ability of online es cluster
LeetCode 1047. Delete all adjacent duplicates in the string
Applicationclientprotocol of yarn source code
New Google brain research: how does reinforcement learning learn to observe with sound?
What are the functions of Fortress machine equipment
An example of SPM manual binding execution plan
Chapter 6: UART echo case of PS bare metal and FreeRTOS case development
Industrial security experts talk about how to build security protection capability for government big data platform?
[hot] with a budget of only 100 yuan, how to build a 1-year web site on Tencent cloud??