Skip to content
11/07/2008 / dimarzionist

howto: Speeding Up PowerShell Startup

Guys from Power Shell team just asked everyone to populate small manual how to increase Power Shell startup performance:

Here is Update-GAC.ps1 script that I run whenever I install a new version of PowerShell. Things get a TON faster so. Their install team is looking into the issue but until then – here is the script you can use:

Set-Alias ngen @(
dir (join-path ${env:\windir} “Microsoft.NET\Framework”) ngen.exe -recurse |
sort -descending lastwritetime
[appdomain]::currentdomain.getassemblies() | %{ngen $_.location}

(script copied from here)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: