powershell 启动慢的主要原因是 $profile中的终端配置加载时间长。当我们打开powershell终端进行交互时,加载时间长 尚可忍受。但当我们的脚本 执行powershell脚本时,较长的加载时间 是不可接受的。
$profile
powershell启动优化的方法。
捕捉 powershell 终端与脚本二者启动参数的差异。