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.
精彩评论