Friday, March 7, 2014

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered            

Problem occurs when you start SharePoint 2010 Management Shell (Power shell) but don’t get access to the farm. You would be unable to run commands. 

 Solution 1:Run Power shell with another user who don’t see above message e.g. Farm Admin


 Solution  2: 
  
1.    Execute “Add-SPShellAdmin -Username domain\User”(required user that you want to get Access to Power shell)
2.    Successful execution will ensure that desired user is Shell Admin and can execute commands. 
                            http://technet.microsoft.com/en-us/library/ff607596.aspx 

Solution  3:

As you can see it is Power Shell Version 3.0 which doesn’t support SharePoint 2010

to resolve the issue, change Power Shell start menu short cut path and added –version 2.0 switch parameter, below is the complete path with –version 2.0 switch.

C:\Windows\SYSTEM32\WINDOWSPOWERSHELL\V1.0\PowerShell.exe -version 2.0 -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1' "

Add –version 2.0 switch;

By doing this  could run Power Shell 2.0 which support SharePoint 2010 commands

  

Please Comment if you need Any Help.Your Feed back is always Welcome.I Am Happy to Help !!!!!

4 comments:

  1. My
    manager has given access me SharePoint farm as local administrator using
    Central Administration >> Security >> People & Groups and added
    me as farm administrator as shown below





    He did same think SQL server as local administrator.

    I recently wanted to remove a third party solution using PowerShell and I received
    this error.

    The local farm is not accessible.
    Cmdlets with FeatureDependencyId are not registered.



    I used your blog as well and navigated to SharePoint 2013 PowerShell Management
    Shell and run as administrator and received the same error.




    I am not able to run any SharePoint PowerShell scripts on the server because of
    this error. In my past I used to give new farm admins using 1) HEY_LOCAL_MACHINE >> Software >>
    Microsoft >> PowerShell >> Right Click PowerShell Folder
    Permissions >> (New Farm User) and then

    2) Add new user using Add-SPShellAdmin -Username DOMAIN\NewUser.



    I tried this option as well by giving myself permissions to PowerShell in registry
    but it gave same error.



    Any technique that I could access PowerShell cmdlets and eventually access to
    SQL server?



    Thank you.

    ReplyDelete
  2. HI Aroh,Appreciate gifting of your time to resolve the issue.Launch this cmdlet by using (for example) the account used to install your farm.

    Add-SPShellAdmin -Username DOMAIN\NewUser

    http://technet.microsoft.com/en-us/library/ff607596.aspx

    ReplyDelete
  3. HI Aroh,please check with the other solution that was added in post.

    ReplyDelete
  4. Hi Anil,

    Thanks for yourreply.
    I have tried that option yesterday as well.

    I also tried to use the following PowerShell cmdlet but that
    option did work

    Get-SPDatabase | ?{$_.Name -eq "WSS_Content"} | Add-SPShellAdmin -Username DOMAIN\ashukla

    Any idea
    how I solve this?

    Thank
    you.

    Cheers,

    Aroh

    ReplyDelete

Your feedback is Much Appreciated. I will try to reply to your queries as soon as possible!!Anil Avula

ShareThis

X