How can I speed up the Exchange Management Shell launch?


Have you noticed it takes quite a long time to open up the Exchange command shell? I timed it and it takes anywhere from 20 to 30 seconds to launch.  I found a way to knock this down to 2-3 seconds. This script updates the GAC with some of the Exchange assemblies and makes Command Shell respond well.

1) Paste the following in notepad and save it as Update-shell.ps1 (or whatever name you want):

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


Note: On x86 systems; replace Framework64 in the second line of this script with Framework.

2) [Optional] Close all open windows

3) [Optional] Start the Exchange Management Shell and note the time it takes to start up

4) Run the script: .\Update-shell.ps1 (or whatever you saved it as)

5) Quit all open windows, start the Shell. This fix rocks.

Comments (2)

  1. markga says:


    I am not sure if this is even needed for Exchange 2010.

  2. hk says:

    Does this fix work on E2K10 as well?

Skip to main content