我正在研究 RDWeb 访问解决方案,并想检查在 Internet Explorer 页面中键入时 RDS 主机是否重定向到https://rds.ca.org/rdweb
例如,我想通过 PowerShell 脚本检查我是否在 IE 页面中键入srdshost01
或02
或03
或04
,它应该为我提供重定向链接。
我正在研究 RDWeb 访问解决方案,并想检查在 Internet Explorer 页面中键入时 RDS 主机是否重定向到https://rds.ca.org/rdweb
例如,我想通过 PowerShell 脚本检查我是否在 IE 页面中键入srdshost01
或02
或03
或04
,它应该为我提供重定向链接。
您可以使用备用主机名将HttpWebRequest发布到 URL,并检查响应是否从重定向的 URL 发送:
$response = [System.Net.WebRequest]::Create("http://srdshost01").GetResponse()
$isRedirected = $response.ResponseUri -eq "https://rds.ca.org/rdweb"