was working with one of my customer where Exchange management shell was missing after applying Microsoft Exchange service pack.

 

Went ahead and given work around as mentioned in below articles. However, customer was not really accepting the workaround.

http://support.microsoft.com/kb/2397266

 

Let’s make it permanent solution rather than workaround:

 

As most of us aware that we can’t uninstall/reinstall Exchange management tool without making server level changes in setup. It could be either add a new role or remove an existing role along with Management tools. Advising reinstallation of the server not be an appropriate as that may not be acceptable by customer and that’s time consuming as well. Let’s follow below action plan:

 

Estimated time: 20 mnts.

 

Problem

After installing Service Pack for Exchange Server 2010, the Exchange Management Shell is missing.

Cause

Missing certain .ps1 scripts from the bin directory, removed during SP setup.Resolution.

 

This problem can occur if there is a missing value in the registry when Setup is run for AdminToolsRole. The missing registry value is as follows:

 

Path: HKEY_LOCAL_MACHINE\Software\Microsoft\ExchangeServer\v14\Admin Tools

  • Value: ConfiguredVersion

 

Path: HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShell\1\PowerShellSnapIns

Missing keys:

  • PowerShellSnapIns\Microsoft.Exchange.Management.PowerShell.Setup

  • Microsoft.Exchange.Management.PowerShell.E2010

  • Microsoft.Exchange.Management.Powershell.Support

 

To resolve this issue, follow these steps:

  1. Verify that the following files are present in the %ExchangeInstallPath%\bin directory:

  • CommonConnectFunctions.ps1

  • Connect-ExchangeServer-help.xml

  • ConnectFunctions.strings.psd1

  • RemoteExchange.strings.psd1

  • CommonConnectFunctions.strings.psd1

  • ConnectFunctions.ps1

  • RemoteExchange.ps1

 

  1. If any of these files are missing, copy the files from the Exchange Server 2010 Service Pack 1 installation media to the %ExchangeInstallPath%\bin directory.

Note: These files are present in the \Setup\Serverroles\Common folder.

  1. Click Start, click Run, type regedit, and then click OK.

  2. Locate and then right-click the following registry subkey:

HKEY_LOCAL_MACHINE\Software\Microsoft\ExchangeServer\v14\Admin Tools

  1. Click New, click String Value, and then type ConfiguredVersion.

  2. Double-click ConfiguredVersion, and then type the SP version. (For an example: SP version will be: 14.2.247.5).

    Note: This value should match the UnpackedVersion value. This value is found in the same key.

  3. Go to a healthy server and export registry:

    HKEY_LOCAL_MACHINE\Software\Microsoft\PowerShell\1\PowerShellSnapIns

  4. Export all 3 or you can target PowerShellSnapIns.

  5. Import in the effected server.

  6. Run Get-Pssnapin –registered to verify the registry.

  7. Create a shortcut for Exchange management shell on another server and copy it to the effected server.

  8. Browse below path:

    C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Exchange Server 2010

  9. Paste the shotcut.

  10. Now you will be able to see Exchange management shell in startup.

 

Additional:

If you create a shortcut and keep in desktop, you may have to change the target to run the shell.

 

  1. Right-click the new shortcut that you created on the desktop, and then click Properties.

  2. In the Target path on the Shortcut tab, replace the text with the following text:

 

C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto" 

Or,

%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". '%ExchangeInstallPath%\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto"

 

 

Note If the Windows root drive or the Exchange installation folder or drive name differs from the default that is specified in the example, you have to change the path accordingly

Warning If you manually created shortcuts for the Exchange Management Shell before you installed or updated the server, you may have to repeat these steps to correctly target the Exchange Management Shell path.

 

Thank you,

Mukut-