I was working with one of my customer whereas we had issue after upgrading SP. Windows PowerShell snap-in "Microsoft Exchange management PowerShell E2010 is not installed on this machine, The Microsoft Exchange API could not be located”. Because this this his backup was failing too as his backup application executes backup using Microsoft Exchange management PowerShell.
After you upgrade to Exchange Server 2010 Service Pack The windows PowerShell snap-in "Microsoft Exchange management PowerShell E2010 is not installed on this machine, The Microsoft Exchange API could not be located”
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:
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
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=22.214.171.124, 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=126.96.36.199, 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"
Important: This solution will be applied to any issue where Microsoft Exchange management PowerShell is integrated.