我安装了最新的powershell 7, 我的机器环境是离线的,即断网的,没有网络的。
Powershell 7启动的时候会卡30s左右才能用,而cmd正常。
搜索发现,是因为它要联网检查证书。进行如下操作可以秒开,解决问题。
步骤:
打开IE浏览器 ---》 选择internet选项---> 选择高级---》下拉到 安全---》 取消勾选 检查发行商的证书是否已吊销 ---》 保存
这样就可以秒开了。
是 Slow to start an powershell script with no internet - Stack Overflow 这篇文章给的启发:
I did as they say: select TOOLS/INTERNET OPTIONS from IE - select ADVANCED from the new window - scroll down to SECURITY - uncheck "check for publishers certificate revocation" And it solve the problem