【发布时间】:2020-11-06 02:01:59
【问题描述】:
我正在尝试使用 Invoke-RestMethod 在 Powershell 5.1 版中访问 Foreman API
我收到以下错误:
Invoke-RestMethod : 底层连接已关闭:无法为 SSL/TLS 安全通道建立信任关系。
我在此命令之前尝试了以下命令,但没有成功。
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
我尝试过使用 Tls,Tls11 也尝试过,但没有成功。
【问题讨论】:
-
您在哪个版本的 Windows 上运行?
标签: powershell ssl