Scenario:
You try to run a PowerShell script and the script fails with this message:
The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered
Cause:
When you run this cmdlet to add a user to the SharePoint_Shell_Access role, you must have membership in the securityadmin fixed server role on the SQL Server instance, membership in the db_owner fixed database role on all affected databases, and local administrative permission on the local computer.
Fix:
Run this script in PowerShell:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue; Add-SPShellAdmin -UserName Domain\UserName;
http://technet.microsoft.com/en-us/library/ff607596.aspx