So after moving all my databases to the new SQL server I run this on my SharePoint central admin box, http://technet.microsoft.com/en-us/library/cc512725(v=office.15).aspx#Man

Everything goes through and I can see connections to my new configuration database. So I detach the original from the old SQL server and when I try to open SharePoint Powershell I get the following:

the local farm is not accessible. cmdlets with featuredependencyid are not registered

As soon as I reattach the old SQL database everything works again. I assume SharePoint is referencing that old database somewhere but I can not for the life of me find the reference.

I have tried to do the following to no avail:

Connect-SPConfigurationDatabase -DatabaseServer "sql-db-alias" -DatabaseName "SharePoint15_Config" -Passphrase (ConvertTo-SecureString "yourpassphrase" -AsPlainText -Force)

I AM running it as an administrator, and I have checked all the permissions on the new SQL server to have full rights to this database. Still nothing. Help!


1 Answer 1


Only Powershell is not working after detaching the DBs from Original SQL or other stuff also broked?

You can modify manually the rights associated to your account in SQL Server, but I prefer using the Add-SPShellAdmin This link is external to TechNet Wiki. It will open in a new window. cmdlet, which will do the work for you.

Launch this cmdlet by using (for example) the account used to install your farm.

Syntax : Add-SPShellAdmin -UserName Domain\User

  • To get the list of all the users having the "SharePoint_Shell_Access" role, use the Get-SPShellAdmin This link is external to TechNet Wiki. It will open in a new window. cmdlet.

Also have a look on this Wiki by Technet.

  • 3
    I think he'll need a user with access to the config DB before he can run Add-SPShellAdmin.. kind of circular I know :-)
    – Louis
    Commented Oct 28, 2014 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.