PowerShell 3.0 (KB2506143) and SharePoint 2010, Not There Yet

So a bit of a rant, but as it turns out installing the Windows Management Framework 3.0 (KB2506143) on a SharePoint 2010 server is not such a good idea.

After installing the Windows Management Framework 3.0 on a SharePoint 2010 Server I can’t use the "SharePoint 2010 Management Shell" anymore.  SharePoint uses .NET 3.5 and PowerShell 3.0 uses .NET 4, so when I try to open the SharePoint management console and run a SharePoint cmdlet I get some fun errors that Microsoft SharePoint is not supported by Version 4.0

A PlatformNotSupportedException occured while trying to acquire the local farm: System.PlatformNotSupportedException: Microsoft SharePoint is not supported with version 4.0.30319.586 of the Microsoft .Net Runtime. at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Farm() at Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm, Boolean& isJoined)

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.

So thanks for the lack of warning… but the fix is easy enough:

  1. Open the Installed Updates on the server
  2. search for KB2506143
  3. Uninstall
  4. Reboot
  5. Open PowerShell and type “(Get-Host).version”, you’ll see it is now running in 2.0 mode again.

You would think that during the install process of the WMF 3.0 it might check for SharePoint components and at least give a warning, but as the PowerShell team says here: http://connect.microsoft.com/PowerShell/feedback/details/746908/powershell-3-0-and-sharepoint-2010

Posted by Microsoft on 6/7/2012 at 12:34 PM

This is not an issue with Windows PowerShell. This is an issue with SharePoint 2010. The SharePoint team is aware of this compatibility issue and plans to address it in an upcoming release or service pack.

2 thoughts on “PowerShell 3.0 (KB2506143) and SharePoint 2010, Not There Yet”

Leave a Reply