PowerShell error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.
When you run SharePoint management powershell on your SharePoint 2010 server you get the following error:
The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered
Solution:
Make sure the logged in user has the correct rights to the SharePoint_Configuration database
- SharePoint_Shell_Acces or:
- DB_reader or DB_writer
Use the following Powershell cmdlet to give this user the correct databases permissions, since Direct database changes are not supported by Microsoft: Add-SPShellAdmin (http://technet.microsoft.com/en-us/library/ff607596.aspx)