Category Archives: Script

PowerShell 느릴때

가끔 파워쉘 프롬포트 뜨는데 한참 걸리면 관리자 권한으로 아래 커맨드 실행하면 좀 빨리뜬다

$env:PATH = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | ForEach-Object {
    $path = $_.Location
    if ($path) { 
        $name = Split-Path $path -Leaf
        Write-Host -ForegroundColor Yellow "`r`nRunning ngen.exe on '$name'"
        ngen.exe install $path /nologo
    }
}

https://stackoverflow.com/questions/59341482/powershell-steps-to-fix-slow-startup