Here is the script I got it from Windows PowerShell Blog for improving the startup speed.
Set-Alias ngen @(<br></br>dir (join-path ${env:windir} "Microsoft.NETFramework") ngen.exe -recurse |<br></br>sort -descending lastwritetime<br></br>)[0].fullName<br></br>[appdomain]::currentdomain.getassemblies() | %{ngen $_.location}<br></br><br></br><br></br>