When I tried to open SharePoint Management Shell, I got the following error :
The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered
The current user don’t have a SharePoint_Shell_Access role for SharePoint_Config or not added to SP Shell Admin.
Try to run the SharePoint Management Shell as Administrator.
If this solution does not solve the issue, you will need to follow the bit steps below:
- Open SQL Management Studio > Connect to SQL Server.
- From Object Explorer > Security > Logins > Right clicks on the current user > Properties. (If the current user wasn’t added. Add it).
- From left side > Select User Mapping > Check SharePoint_Config > Check SharePoint_Shell_Access.
Go back to Share Point Management Shell that should now be working properly.
If you didn’t have access to SQL Server , or the current organization policy prevent to modify the database users Roles, So you should ask someone who has the rights to run Windows PowerShell to add your user as SP Shell Admin.
- Open Windows PowerShell.
- Run the following Cmdlets one by one.
Add-PSSnapin "Microsoft.SharePoint.PowerShell" Add-SPShellAdmin -UserName Domain\User