Granting a User Shell Admin Access to All SharePoint Databases

To achieve this, do the following:

  1. Login to the SharePoint server to be monitored.
  2. Open the SharePoint 2010 Management Shell as administrator.

    shelladmin1

    Figure 1 : Opening the SharePoint Management Shell

  3. From the management shell, run the following commands one after another:

    Add-PSSnapin Microsoft.SharePoint.PowerShell

    Get-SPDatabase | Add-SPShellAdmin <domainname>\<username>

    For instance, to grant shell admin access to user ctxuser in domain citrix, the commands will be:

    Add-PSSnapin Microsoft.SharePoint.PowerShell

    Get-SPDatabase | Add-SPShellAdmin citrix\ctxuser