Invoke-webrequest 未能創建 SSL/TSL 連線

 明明只是想下載個檔案,也能…

 Invoke-webrequest 出錯,未能創建 SSL/TSL 連線

 工作環境:
  Windows 10
   WSL installing on non-system Drive

 查詢現階段既有的連接安全協議

  [Net.ServicePointManager]::SecurityProtocol

 此時應該只有 Ssl3, Tls 

 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Ssl3 -bor [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12

 再查

  [Net.ServicePointManager]::SecurityProtocol

 應該變成

  Ssl3, Tls, Tls11, Tls12

 再次 Invoke-webrequest 可行



收工!


留言

這個網誌中的熱門文章

使用 Excel 計算2個地點之間的直線距離

LINE 儲存的檔案傳到 email 不方便 很不方便 非常不方便 但是有解的筆記

Excel 巨集合併多個 Excel 檔案