Search This Blog

Wednesday 13 March 2013

SP2010: the local farm is not accessible. cmdlets with featuredependencyid are not registered on Power Shell

Hi,

DO you get this when opening SharePoint power shell:

SharePoint is not yet compatible with .Net 4.
Solution:
Force it to run under older version.
Go to you SharePoint 2010 management shell  properties


Here you need to edit the target:

Before: Should be something like this:

ws\System32\WindowsPowerShell\v1.0\PowerShell.exe –NoExit   " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

After: Add -Version 2
C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe –version 2 –NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

Your Shell should now open with no issues.

No comments:

Post a Comment