开发者

Slow to start an powershell script with no internet

开发者 https://www.devze.com 2022-12-16 16:22 出处:网络
I run a Powershell script on a computer that has no Internet connection. But it takes about 30 seconds to sta开发者_StackOverflow社区rt it. How do I solve it?

I run a Powershell script on a computer that has no Internet connection. But it takes about 30 seconds to sta开发者_StackOverflow社区rt it. How do I solve it? I have run ngen.


There is a known issue with certificate revocation list checks and .NET (which PowerShell is built on). Check out this post about the .NET issue.


Sounds like it might be trying to do a DNS lookup, and waits for it to time-out. I presume it doesn't take ~30 seconds to start on a machine with internet connection? You could try setting a bogus DNS resolver on the working machine, and see if it takes ~30 seconds there too.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号