I have written before about the case of a missing shortcut for Exchange PowerShell here http://blogs.technet.com/b/nawar/archive/2010/09/03/exchange-management-shell-ems-missing-after-applying-exchange-2010-sp1.aspx
Today while working onsite with a customer trying to executing some Exchange PowerShell commands , we started getting the following
“'Microsoft.Exchange.Management.PowerShell.E2010' is not installed on this machine.”
The first thing we did was to verify that the ConnectFunctions.ps1 , RemoteExchange.ps1 and CommonConnectFunctions.ps1 files are present in the %ExchangeInstallPath%\bin directory. NOTE : If these files are missing, you can copy the files from the Exchange Server 2010 Service Pack installation media (depending on the service pack you are using) to the %ExchangeInstallPath%\bin directory. These files are present in the \setup\serverroles\common folder.
Since those files existed on the server that we were having the problem with , we proceeded to check the Exchange registered snap-ins with the following command from the Exchange PowerShell:
For Exchange 2010 this should return
Name : Microsoft.Exchange.Management.PowerShell.E2010
PSVersion : 1.0
Description : Admin Tasks for the Exchange Server
Name : Microsoft.Exchange.Management.PowerShell.Setup
Description : Setup Tasks for the Exchange Server
Name : Microsoft.Exchange.Management.Powershell.Support
Description : Support Tasks for the Exchange Server
In our case it only returned
Looking at the following registry key on the server (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\) showed only the registry key related to setup, which means we need to manually create the other two registry keys to solve the broken Exchange PowerShell problem.
The easiest way to do this is by exporting two missing resitry key from a healthy server , but you need to make sure that the install path is exactly the same and servers are running the same version, if the installation path is not the same you can change to match the path on your broken server after exporting the key .
The actual keys are below , but as I mentioned before make sure that the installation path of exchange from server you export from matches the exchange installation path of the server you are importing to
Windows Registry Editor Version 5.00
"ApplicationBase"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\\bin"
"AssemblyName"="Microsoft.Exchange.PowerShell.Configuration, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
"Description"="Admin Tasks for the Exchange Server"
"ModuleName"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\\bin\\Microsoft.Exchange.PowerShell.Configuration.dll"
"AssemblyName"="Microsoft.Exchange.Management.Powershell.Support, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
"Description"="Support Tasks for the Exchange Server"
"ModuleName"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\\bin\\Microsoft.Exchange.Management.Powershell.Support.dll"