We are trying to run PowerShell as an Administrato and we are getting this error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered
We've tried to grant the user access to database role SharePoint_Shell_Access under SharePoint_Cofig but the error still persists.
We have also tried to run this command: Add-SPShellAdmin -username Domain\user and it throws this error: Add-SPShellAdmin: Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again.