gpt4 book ai didi

使用 SSL/TLS 安全通道的 Powershell Invoke-WebRequest 失败

转载 作者:太空宇宙 更新时间:2023-11-03 14:31:26 41 4
gpt4 key购买 nike

我正在尝试执行这个 powershell 命令

调用-WebRequest -Uri https://apod.nasa.gov/apod/

我得到了这个错误。 “Invoke-WebRequest:请求被中止:无法创建 SSL/TLS 安全通道。” https 请求似乎有效(“https://google.com”)但不是这个问题。我怎样才能让它工作或使用其他 powershell 命令来读取页面内容?

最佳答案

尝试使用这个

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://apod.nasa.gov/apod/

关于使用 SSL/TLS 安全通道的 Powershell Invoke-WebRequest 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52565738/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com