powershell - Powershell Invoke-WebRequest返回 “remote name could not be resolved”,但不返回代理错误

标签 powershell url proxy dns

我正在Powershell中使用wget(别名Invoke-WebRequest)下载页面。有问题的页面是www.privatahyresvärdar.nu

使用Internet Explorer时,我可以导航到www.privatahyresvärdar.nu,但无法从powershell运行wget,也不能对站点进行ping。这两个命令都不能解析主机名。

我在SO和其他站点上遵循了一些建议,评论使用Proxies作为wget失败的错误源,但是我没有使用任何代理。

请帮助我确定错误源!

最佳答案

片刻之后,让我震惊的是这可能是编码错误!在使用在线punycode编码器(punycode)将主机名替换为first hit on google之后,它就像一个魅力!

enter image description here

关于powershell - Powershell Invoke-WebRequest返回 “remote name could not be resolved”,但不返回代理错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41576136/

相关文章:

python - 如何将字符串变量从 python 传递给 PowerShell 函数

windows - 电源外壳 : ftp directory listing (help on a script)

java - 更改 .JSP 文件的名称

http - 为什么Fiddler添加连接:close on CONNECT response?

powershell - 纠缠 v5.1 : Should -Throw with message containing square-brackets fails

python - 从多个 url 的 csv 列表打印 JSON 数据

javascript - 谷歌+网址分享

javascript - 发布到 Capsule CRM 和 "AJAX Proxy"

tomcat - 当代理服务器关闭时,NGINX 反向代理返回 502 错误网关

powershell - Powershell:获取两个随机的独立数字