Friday 11 July 2014

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered." When trying to do any operation for example Get-SPWeb you will get this error message

Solution:
Change the target for SharePoint 2010 Management Shell to
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 ' "
Right-click on the SharePoint 2010 Management Shell shortcut and click on properties and change the target by adding -Version 2.0 after powershell.exe

OR

open your powershell and type this command:
Powershell –v 2