Granting access to the SharePoint content database for an managed account
With the following Windows PowerShell Command, a managed account can be provided access to a content database.
$w = Get-SPWebApplication -identity http://<WebApplication> $w.GrantAccessToProcessIdentity("<Domain>\<Username>")
Note: Before running this command, the account should be registered as managed account
To register a managed account
- On the SharePoint Central Administration website home page, in the left navigation, click Security.
- On the Security page, under General Security, click Configure managed accounts.
- On the Managed Accounts page, click Register Managed Account.
- Type the user name and password of the domain account that you are registering.
- Optionally, select the Enable automatic password change check box if you want SharePoint Server to manage password changes for this account.
- Click OK.