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

Problem

You install .NET Framework 4.0 on your SharePoint 2010 WFE and SharePoint 2010 Management Shell stops working. When you run it, you get the following message:

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

Running any SharePoint cmdlet yields the following result:

Get-SPDatabase : Microsoft SharePoint is not supported with version4.0.30319.296 of the Microsoft .Net Runtime.

Solution

Modify the shortcut used to run SharePoint 2010 Management Shell.

  1. Right click on the shortcut -> Properties
  2. Under the Shortcut tab, modify the Target by adding -version 2.0 just after PowerShell.exe so that if looks like: PowerShell.exe -version 2.0 -NoExit
  3. Save your settings and re-run SharePoint 2010 Management Shell.

 

Tags:

6 Responses to “The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.”

  1. Jason January 9, 2013 at 10:15 pm #

    Rockin’ – thanks!!

  2. Alfredo Ars January 29, 2013 at 2:26 am #

    Yeah, it’s the solution form me! thanks.

  3. jon January 30, 2013 at 7:55 am #

    thanks! that did it!

  4. ivan February 19, 2013 at 6:40 am #

    Thanks, (rock).!!

  5. wpinaga9729 March 1, 2013 at 4:24 am #

    Solved my issue. Thanks alot!

  6. Farah Ghabra April 6, 2013 at 7:35 am #

    Still not solved!

Leave a Reply

%d bloggers like this: