文章目录
1.使用Invoke-WebRequest 和 Invoke-RestMethod 时可能出现的安全问题
ERROR: The request was aborted: Could not create SSL/TLS secure channel.
参考了Powershell Invoke-WebRequest Fails with SSL/TLS Secure Channel 和PowerShell – Could not create SSL/TLS secure channel两篇文章后,采用的解决方案为
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;