Overhauling the PowerShell startup process

Share this:

Hello folks,

I saw an interesting post in the PowerShell Team Blog (https://blogs.msdn.com) and they explained that running the script below you can increase the speed to open your PowerShell Console, as follows:

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

Read more at source: http://blogs.msdn.com/powershell/default.aspx

I ran in my machine and the startup time was much better than before. There is also a comment on that post to use Microsoft.NETFramework64 in case of a x64 system.

What’s your impression? Has it tuned up your PowerShell? Drop us a line about your experience.

Anderson Patricio.

Written by Anderson Patricio

Anderson Patricio is a Canadian Exchange Server MVP and MCSM (Solutions Master) and he contributes to the Microsoft Community with articles, tutorials, blog posts, forums and book reviews. He is a regular contributor at MSExchange.org, ITPROCentral.com and AndersonPatricio.org (Portuguese).