Unable to run Sharepoint Powershell scripts


I am running SharePoint module scripts from within modules which are referenced from the Deploy.ps1 file.
Is SharePoint deployment supported , cause i keep getting
New-SPWebApplication : You need to have Machine administrator privileges to run this cmdlet.
Naturally in powershell i would run the powershell window as administrator ,but in this instance i don’t know how to achieve the same result.
Please help



Hi Andrew,

Thanks for getting in touch! The error shown on your screenshot is a Sharepoint privileges error, meaning the module got loaded successfully, but the command was executed by an account without enough permissions.

In Octopus the Powershell commands are run by the account running the Octopus Tentacle service, which by default is Local System. Here’s a doc that shows how to change the user running the Powershell commands, in case you want to switch that to a user with enough privileges on your SharePoint farm

Hope that helps!


Thanks .already figured it out. You actually have to add the service
account used for the tentacle service to the Administrators group on

Kind Regards