PowerShell Server: Cannot load Windows PowerShell snap-in Microsoft.Exchange.Management.PowerShell.e2010

Problem Description

When attempting to load the Microsoft Exchange 2010 cmdlets in PowerShell Server you may see the following error:

Exception type: PSSnapInException
Exception message: Cannot load Windows PowerShell snap-in Microsoft.Exchange.Management.PowerShell.e2010 because of the following error: The type initializer for 'Microsoft.Exchange.Data.Directory.Globals' threw an exception.

Cause

This error is not specific to PowerShell Server. It is a known issue with the Microsoft Exchange cmdlets and version 4.5 of the .NET Framework. If you have installed .NET Framework v4.5, you will no longer be able to access the Microsoft Exchange cmdlets in PowerShell.

Solution

Currently the only known solution is to completely uninstall .NET 4.5 and reinstall .NET 4.0.

Reference

https://connect.microsoft.com/VisualStudio/feedback/details/770748/powershell-exception-after-4-5-upgrade

http://stackoverflow.com/questions/12480447/cannot-load-exchange-powershell-snap-in-the-type-initializer-for-microsoft-exc

We appreciate your feedback.  If you have any questions, comments, or suggestions about this article please contact our support team at kb@nsoftware.com.