SharePoint farm administrator have no permissions to run PowerShell commands
On SharePoint 2010 it is not enough if you are farm administrator. You still cannot run PowerShell commands sometimes. The reason is simple – your user account needs more permissions. Here’s how to add permissions.
- Open SharePoint 2010 PowerShell console as administrator
- Type: Get-SPShellAdmin
- Make sure your user account is not in the list of shell administrators
- Type: Add-SPShellAdmin –username <your username>
- Type: Get-SPShellAdmin
- Your newly added username should now exist in the shell admins list
Now you can run your PowerShell scripts from your farm administrator (or any other) user account.