I was onsite recently and a vendor from a 3rd party product was having difficulties installing the application. When I looked at the error it was referencing ‘Microsoft.Exchange.Management.Powershell.E2010’ which should be there since this was a physical Exchange 2010 SP1 RU1 box. This was a bit odd so I looked at the current snapins by using the “get-pssnapin” command and nothing but Microsoft.Exchange.Management.PowerShell.Setup was there! WHAT!? I was expecting to see the following:
Microsoft.Exchange.Management.PowerShell.Setup
Microsoft.Exchange.Management.PowerShell.E2010
Microsoft.Exchange.Management.Powershell.Support
I then tried to manually load the Microsoft.Exchange.Management.Powershell.E2010 and we got the following error:
“The windows Powershell snap-n ‘Microsoft.Exchange.Management.Powershell.E2010’ is not installed on this machine.”
REALLY!!?
The next thing to check was to see if ConnectFunctions.ps1, RemoteExchange.ps1, and CommonConnectFunctions.ps1 was in D:Program FilesMicrosoftExchange ServerV14bin (this paticular install path for Exchange) and they were. Apparently there have been reports that issues occurred on this server only during the SP1 roll out and after the fact some random issues with running basic commandlets also occurred. Looking into the registry we found somethign interesting in HKLMSOFTWAREMicrosoftPowerShell1PowerShellSnapIns. We saw only 1 out 3 keys and you might have guessed it.. the Microsoft.Exchange.Management.PowerShell.Setup
I then tried to manually load the Microsoft.Exchange.Management.Powershell.E2010 and we got the following error:
“The windows Powershell snap-n ‘Microsoft.Exchange.Management.Powershell.E2010’ is not installed on this machine.”
We then looked in HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell and found only the Setup key in parent key of the broken server but all three are there for servers that work ok. Since the install path was exactly the same we safely exported the missing registry keys and imported them in and it worked (no reboot needed). The followign is the actual keys that are needed:
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell1PowerShellSnapInsMicrosoft.Exchange.Management.PowerShell.E2010]
“CustomPSSnapInType”=”Microsoft.Exchange.Management.PowerShell.AdminPSSnapIn”
“ApplicationBase”=”D:Program FilesMicrosoftExchange ServerV14bin”
“AssemblyName”=”Microsoft.Exchange.PowerShell.Configuration, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”
“Description”=”Admin Tasks for the Exchange Server”
“ModuleName”=”D:Program FilesMicrosoftExchange ServerV14binMicrosoft.Exchange.PowerShell.Configuration.dll”
“PowerShellVersion”=”1.0”
“Vendor”=”Microsoft Corporation”
“Version”=”14.0.0.0”
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell1PowerShellSnapInsMicrosoft.Exchange.Management.PowerShell.Setup]
“CustomPSSnapInType”=”Microsoft.Exchange.Management.PowerShell.SetupPSSnapIn”
“ApplicationBase”=”D:Program FilesMicrosoftExchange ServerV14bin”
“AssemblyName”=”Microsoft.Exchange.PowerShell.Configuration, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”
“Description”=”Setup Tasks for the Exchange Server”
“ModuleName”=”D:Program FilesMicrosoftExchange ServerV14binMicrosoft.Exchange.PowerShell.configuration.dll”
“PowerShellVersion”=”1.0”
“Vendor”=”Microsoft”
“Version”=”14.0.0.0”
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell1PowerShellSnapInsMicrosoft.Exchange.Management.Powershell.Support]
“CustomPSSnapInType”=”Microsoft.Exchange.Management.Powershell.Support.SupportPSSnapIn”
“ApplicationBase”=”D:Program FilesMicrosoftExchange ServerV14bin”
“AssemblyName”=”Microsoft.Exchange.Management.Powershell.Support, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”
“Description”=”Support Tasks for the Exchange Server”
“ModuleName”=”D:Program FilesMicrosoftExchange ServerV14binMicrosoft.Exchange.Management.Powershell.Support.dll”
“PowerShellVersion”=”1.0”
“Vendor”=”Microsoft Corporation”
“Version”=”14.0.0.0”