小编Sco*_*Lee的帖子

无法使用来自 PowerShell 的 Invoke-Webrequest 为 SSL/TLS 安全通道建立信任关系

当我尝试在 https 上使用 Invoke-WebRequest 时,出现了一些奇怪的错误:

“Invoke-WebRequest:底层连接已关闭:无法为 SSL/TLS 安全通道建立信任关系。”

这是我的代码:

   [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls
    $url = "https://X.X.X.X:4343/officescan/console/html/cgi/cgiChkMasterPwd.exe"
    $r = Invoke-WebRequest $url -SessionVariable office
Run Code Online (Sandbox Code Playgroud)

对我有什么建议吗??非常感谢。

powershell ssl

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

powershell ×1

ssl ×1