SharePoint

How to grant account access to all SharePoint databases using powershell

Despite the short post, this is a very handy trick for your development environment.

Run the following PowerShell command as your Farm administrator account, or an account with similar permissions. Just replace “DOMAIN\user” with your desired account (like the one you usually use for logging into your develeopment environment).

Get-SPDatabase | Add-SPShellAdmin "DOMAIN\user"

Warning! You should never do this in a production environment, but stick to a least privilege strategy for your accounts!

Standard