Last Updated on 2016-11-21.
[:en]After upgrading the OS running Exchange 2010 Server to 2012 R2 or 2016 Server, you might encounter issues with starting the Exchange Management Shell or executing Powershell Scripts which use Exchange Snapins.
Errors appearing (parts in German):
‘Microsoft.Exchange.Management.PowerShell.E2010’ is not installed on this machine
Es wurden keine Snap-Ins für die Windows PowerShell-Version 5 registriert.
+ Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
10153
Der Konfigurationsabschnitt “system.webServer/system.management.wsmanagement.config” kann aufgrund des fehlenden Schemas nicht gelesen werden..
Solution
First make sure you have the Windows feature “WinRM IIS Extension” installed. If not: Install it, then Exchange Management Shell should start again without errors.
For the Powershell scripts, it seems like Windows remove some registry keys regarding the Snapins. You can check e.g. with Powershell command “Get-PSSnapin”.
Create a .reg text file with the following entries:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\PowerShellSnapIns\Microsoft.Exchange.Management.Powershell.Support] "CustomPSSnapInType"="Microsoft.Exchange.Management.Powershell.Support.SupportPSSnapIn" "ApplicationBase"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\\bin" "AssemblyName"="Microsoft.Exchange.Management.Powershell.Support, Version=14.0.0.0, 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" "PowerShellVersion"="1.0" "Vendor"="Microsoft" "Version"="14.0.0.0" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\PowerShellSnapIns\Microsoft.Exchange.Management.PowerShell.E2010] "CustomPSSnapInType"="Microsoft.Exchange.Management.PowerShell.AdminPSSnapIn" "ApplicationBase"="C:\\Program Files\\Microsoft\\Exchange Server\\V14\\bin" "AssemblyName"="Microsoft.Exchange.PowerShell.Configuration, Version=14.0.0.0, 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" "PowerShellVersion"="1.0"
Make sure the paths are correct for your installation.
A reboot or service restart should not be necessary.
Reference[:]