powershell提升启动速度

在powershell中输入脚本,回车,等待执行完成

$Env:PATH = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | % {
  $pt = $_.Location
  if (! $pt) {continue}
  if ($cn++) {''}
  $na = Split-Path -Leaf $pt
  Write-Host -ForegroundColor Yellow "NGENing $na"
  ngen install $pt
}

 

posted @ 2022-12-06 12:48  吃西瓜最快  阅读(290)  评论(0编辑  收藏  举报