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


When I opened up my PowerShell window today which automatically reads in the SharePoint PSSnapin I got the error message.
“The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered”

From this I was unable to call any SharePoint cmdlets. I think when I installed Visual Studio 2012, it also installed powershell V3, which uses the .NET 4.0 runtime. As you might be aware, SharePoint 2010 isn’t .net 4.0 compatible.

So to get powershell v2 working you need to open up a command prompt window, navigate to c:\windows\system32\windowspowershell\v1.0 and then run powershell.exe -version 2

Advertisements