So there I was opening SharePoint 2013 Management Shell, but what I was not expecting was this wonderful welcoming message:
The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.
Cause :
SP 2013
The user you are using does not have admin rights, however even if you have launched the Shell with an account who is a farm admin, you can come across this error because there is a big difference between using your account in Central Admin and PowerShell. When you launch operations in the Central Admin, the pool account is used witch has all the required rights on the server and the databases, but when you run commands in PowerShell, your account is used which may not have all the rights.
SP 2010
Most likely Windows Management Framework 3.0 got installed, after installing it PowerShell will start loading .Net framework 4.0. and SharePoint 2010 does not like .Net 4.0 and starts failing.
Fix:
If this was the first time you had to work on an environment or if the farm got migrated to another server and not all the access rights came with, I would suggest getting another administrator to either manually modify the rights associated to your account in SQL Server or run the Add-SPShellAdmin command.
Add-SPShellAdmin -username DOMAIN\UserName
If you are and admin and using Windows 8 or Windows Server 2012, with the Modern UI, it is really easy to miss the Run as Administrator option. you need to right click on the tile to open the apps charm bar at the bottom of the screen, where you can select run as administrator.
No comments:
Post a Comment