FYI: Error "No Windows PowerShell Snap-ins are available for version 1" When Loading Exchange Powershell Snap-in

We are working to get offical public documentation on this subject, I will update this post once we get a KB published...

 

Problem Description

When writing .NET code which uses the System.Management.Automation namespace or using Windows Powershell you may receive the following error when you attempt to load the Exchange Management Shell snap-in.

"No Windows PowerShell Snap-ins are available for version 1"

Resolution

Exchange 2007 is only supported on 64-bit Windows and is, itself, a 64-bit application, therefore many of the components including the shell extensions are 64-bit.

On a 64 bit version of Windows with Powershell installed there are two versions of Powershell.exe. One is the 32-bit version (found at C:\WINNT\syswow64\windowspowershell\v1.0\powershell.exe) and the other is the 64-bit version (found at C:\WINNT\system32\windowspowershell\v1.0\powershell.exe). The Exchange Management Shell snap-in will only load into the 64-bit Powershell. If you try to load it into the 32-bit Powershell.exe, you get the error message above.

Likewise, if you are automating Powershell from an application it must be compiled for 64-bit in order to load the Exchange Management Shell snap-in.