本帖最后由 5i365 于 2022-11-16 18:21 编辑
回复 4# went
多谢大侠
真是晕了, 不知道是我电脑问题还是网的问题, 现在无论如何都执行不了, 现在又报下面的错误, 记得上午时还行呢
难道不成微软被墙了?
----------------------------------------------------------------------------------------------------------------------------------
PS C:\Users\Administrator> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$resp = Invoke-WebRequest 'https://go.microsoft.com/fwlink/?LinkID=113397' -UseBasicParsing
$xml = [xml]('<obj>' + ($resp.Content -replace '(?s)^.*?<h2 id="examples">Examples</h2>', '' -replace '(?s)<h2 id="parameters"> arameters</h2>.*$', '') + '</obj>')
for ($i = 0; $i -lt $xml.obj.h3.Count; $i++)
{
'------{0}------' -f $xml.obj.h3[$i].innerText
$xml.obj.pre[$i].InnerText
}
Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel.
At line:3 char:9
+ $resp = Invoke-WebRequest 'https://go.microsoft.com/fwlink/?LinkID=11 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand |