使用PowerShell进行激活并忘记Web请求

Mat*_*s F 3 powershell

对于PowerShell中的webrequest我使用

Invoke-WebRequest -Uri 'https://www.it-takes-long.de' -UseBasicParsing
Run Code Online (Sandbox Code Playgroud)

有没有办法在火灾中忘记网络请求?

我调用网址从我的构建服务器上预热网页,我宁愿继续下一步而不是等待网络启动.

Mar*_*ndl 7

只需使用cmdlet 将调用放入作业Start-Job:

Start-Job -ScriptBlock {Invoke-WebRequest -Uri 'https://www.it-takes-long.de' -UseBasicParsing}
Run Code Online (Sandbox Code Playgroud)

  • 在20多岁时得到正确答案,问题在1分钟内得到改善,这是一个新记录.我甚至不知道我必须等待一段时间(12分钟)才能接受答案. (2认同)