当前位置:网站首页>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 .
边栏推荐
- How to design a hybrid system
- Windowsvpn client is coveted by vulnerabilities, 53% of companies face supply chain attacks | global network security hotspot
- Tencent cloud CIF engineering effectiveness summit was successfully opened, and coding released a series of new products
- Why can't the fortress machine open the port? There is a problem with the use of the fortress machine port
- What does elastic public IP mean? The advantages of elastic public IP
- Liaoyuan social cloud primary actual combat camp test environment script
- Tencent cloud CVM starts IPv6
- QT creator tips
- How to access the cloud game management server? Which cloud game management server can I choose?
- Instructions for performance pressure test tool
猜你喜欢
![[51nod] 2106 an odd number times](/img/af/59b441420aa4f12fd50f5062a83fae.jpg)
[51nod] 2106 an odd number times
![[51nod] 3047 displacement operation](/img/cb/9380337adbc09c54a5b984cab7d3b8.jpg)
[51nod] 3047 displacement operation
![[51nod] 3216 Awards](/img/94/fdb32434d1343040d711c76568b281.jpg)
[51nod] 3216 Awards

On Sunday, I rolled up the uni app "uview excellent UI framework"

Get to know MySQL database

Simple and beautiful weather code
![[summary of interview questions] zj6 redis](/img/4b/eadf66ca8d834f049f3546d348fa32.jpg)
[summary of interview questions] zj6 redis

Ar 3D map technology

Sorting out of key vulnerabilities identified by CMS in the peripheral management of red team (I)
![[51nod] 2102 or minus and](/img/68/0d966b0322ac1517dd2800234d386d.jpg)
[51nod] 2102 or minus and
随机推荐
Cloud desktop server resource planning, what are the advantages of cloud desktop
Tencent cloud CVM starts IPv6
What does cloud computing elasticity mean? What are its functions?
Shopee Clickhouse cold and hot data separation storage architecture and Practice
What are the configuration requirements for cloud desktop servers? What are the main characteristics of the three points?
What port does the fortress machine use? What is the role of the fortress machine?
How to design a hybrid system
Elk7.15.1 installation, deployment and construction
What is elastic scaling in cloud computing? What are the main applications of elastic scaling in cloud computing?
Process kill problem
Grp: how to gracefully shutdown a process?
No monitoring information seen in kibana
Under what circumstances do you need a fortress machine? What are the functions of a fortress machine
JD Logistics: from giant baby to mainstay
Micro build low code enterprise exchange day · Shenzhen station opens registration
How to install CentOS 6.5 PHP extension
Liaoyuan social cloud primary actual combat camp test environment script
LeetCode 1047. Delete all adjacent duplicates in the string
What aspects does the intelligent identification system include? Is the technology of intelligent identification system mature now?
What is load balancing? What are the functions of load balancing?