In order to use PowerShell, an administrator must be assigned the SharePoint_Shell_Access role on any databases against which PowerShell will be used. For example, to perform tasks that read or manipulate data in the configuration database, an administrator must have the SharePoint_Shell_Access role for the configuration database. Likewise, to work with a specific site collection, the admin must have the SharePoint_Shell_Access role for the appropriate content database
Additionally, the administrator's account must be a member of the WSS_ADMIN_WPG local group on all servers in the farm
1. Open the SharePoint 2013 Management Console.
2. Set a variable reference to the content database. For example, to refer to the content database named WSS_Content_Prj1:
$spcdb = Get-SPContentDatabase
WSS_Content_Prj1
3. Invoke the Add-SPAdmin cmdlet to grant a user, for example for CONTOSO\Dan_Admin, the ability to use PowerShell against that database:
Add-SPShellAdmin -username CONTOSO\
Dan_Admin -database $spcdb
Remember that in order to perform the delegation, you require pretty significant privileges both on the SQL Server side (Security_Admin) and on the SharePoint side (local Administrators group). I know a few enterprises are going to have to breathe deep and "get over" that.
No comments:
Post a Comment