SharePoint PowerShell access and command execution problems

I ran into a problem some time ago and only today I found a solution to this problem.

The problem was when I tried to run a powershell script as a user who is not an SharePoint admin. In other words the problem is related to not having sufficient privileges to run scripts against SharePoint in powershell.

The problem can be solved by using the following command:

Get-SPDatabase | Add-SPShellAdmin SomeDomain\SomeUserName

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s