For anyone trying to run SharePoint 2010 PowerShell Cmdlets, this message typically comes up at some stage:
“The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.”
The most common cause is insufficent permissions to the SharePoint’s Config Database. (Specifically the person logged in needs the role SharePoint_Shell_Access to this DB). Sometimes the Management Shell needs to also be ran as administrator for it to work properly too.
Today I came across a scenario with a customer whereby we had set them up with the correct access to the Config DB, but a couple of days later it stopped working, with the abovementioned bolded error.
It turns out that they had setup SQL with high-availability mirroring, and that their mirror had failed over to the secondary host. Te user trying to run PowerShell cmdlets was not setup with permissions on this server. Giving them permissions on the secondary SQL server allowed them to run the SharePoint PowerShell cmdlets successfully.