Saturday, December 29, 2012

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.(SharePoint 2010 Powershell error)

Error:- "The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered when trying to run SharePoint 2010 PowerShell"

This message would also show up if you try to run the SharePoint 2010 Managment Shell without the proper permissions, or if the account does not have the proper permissions in SQL


the SharePoint 2010 Management Shell was pointing to the incorrect version or path that is invalid and not compatible.
 To Verify which version is being used
1.  Bring up SharePoint 2010 Managment Shell (ignore) the error Message
2.  Type:
$ver=$host | select version
3.  If you receive something like below.  If the Major version is not on 2, then you will get this runtime error.
Major  Minor  Build  Revision
—–  —–  —–  ——–
3      0      -1     -1
4.  Close out of SharePoint 2010 Managment Shell.
5.  Go back to the SharePoint 2010 Managment Shell Shortcut, right click and select “Properties”
6.  Under the Shortcut tab, Target: section, insert ”-version 2″ into the path, like so.  Make sure its before the -NoExit.
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 ‘ “
7.  Click apply, and then Ok
8.  Reopen up the SharePoint 2010 Managment Shell with admin rights, and you should now no longer receive that error, you should then be able to run your scripts.

No comments:

Post a Comment

Seven steps to build and deploy SPFX web part to SharePoint

Install Node.JS Use this link to install Node.JS 2.        Install yeomen and gulp CMD>npm install –g y...