Overhauling the PowerShell startup process

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.NET\Framework”) 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.NET\Framework64 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.

Leave a Reply

Your email address will not be published. Required fields are marked *