Powershell TLS1.2/1.0

Po-Ching Liu
May 26, 2021

--

最近因為電腦重灌,很多環境的東西要重新設定,因此遇到了下圖的問題,
整體來說是powershell預設的 security protocol 是TLS1.0,因此在使用shell下關於http reqeust會發生錯誤,解決方法則是將powershell 預設的security protocol 從TLS1.0 改到1.2。

下這行指令即可
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

--

--