5i365 (我心飞扬)当前离线
上尉
TOP
went 当前离线
少校
cls $url = 'http://go.microsoft.com/fwlink/?LinkID=113392' $resp = Invoke-WebRequest -UseBasicParsing -Uri $url $resp.BaseResponse.ResponseUri.AbsoluteUri复制代码
Function Get-RedirectedUrl { Param ( [Parameter(Mandatory = $true)] [String]$URL ) $request = [System.Net.WebRequest]::Create($url) $request.AllowAutoRedirect = $false $response = $request.GetResponse() If ($response.StatusCode -eq "Found") { $response.GetResponseHeader("Location") } } [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Get-RedirectedUrl "https://www.kugou.com/mixsong/29008597.html" Get-RedirectedUrl "http://go.microsoft.com/fwlink/?LinkID=113392"复制代码