Thursday, May 11, 2006

Speed Up Your PowerShell

I've been having fun with the latest drop of PoSh.  I'll be showing a demo of how to manage workitems on Team Foundation Server with a PoSh script at Saturday's CodeCamp.

One annoyance with the current RC is that it is slow to start.  I saw a thread on the newsgroup about performance and found this nugget:

set-alias ngen C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe
ls $pshome/*.dll |%{ngen install $_.fullname }

The ngen utility compiles .NET assemblies to native code.  Without this step, the PoSh process was performing a JIT compile on all the PoSh assemblies.  Apparently, this is supposed to happen at the end of installation, but doesn't as a result of a bug.  For now, this makes my play... er, work with PoSh even more fun.

++Alan

Comments are closed.