Wednesday, April 24, 2013

PowerShell - "The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered." or Microsoft SharePoint is not supported with version 4.0.30319.17929 of the Microsoft .Net Runtime

I ran into the following issues, when I open PowerShell management console for SharePoint:

a. The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered
b. Microsoft SharePoint is not supported with version 4.0.30319.17929 of the Microsoft .Net Runtime

The solution is mentioned in microsoft support post.  Click Here to see the post.

Solution:

To work around this issue, change the Target field value for SharePoint 2010 Management Shell. To do this, follow these steps:
  • Click Start, and then right-click SharePoint 2010 Management Shell.
  • Click Properties.
  • Click the Shortcut tab in the SharePoint 2010 Management Shell Properties window.
  • Input the following value in the Target field:

 C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Version 2.0 -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "


No comments: