In the Trenches » Some PowerShell scripts…: "Ngen the dlls and try it again. I think you’ll find it faster.
cd $pshome
dir *.dll | %{ ngen.exe $_.fullname}
If ngen is not in your path, use:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe
Jeffrey Snover
Windows PowerShell Architect"