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

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at ITPROCentral.com, MSExchange.org, Techgenix.com and Anderson Patricio.org (Portuguese).