# Execute PowerShell script Source: [https://docs.virtosoftware.com/docs/virto-workflow-automation-web-part/virto-sharepoint-workflow-activities-kit-sharepoint-2010-workflow-platform/code-activities/execute-powershell-script/](https://docs.virtosoftware.com/docs/virto-workflow-automation-web-part/virto-sharepoint-workflow-activities-kit-sharepoint-2010-workflow-platform/code-activities/execute-powershell-script/) Product: Virto Workflow Automation Updated: 2026-11-24 This activity runs a PowerShell script on the SharePoint server as part of the workflow and stores its output in a workflow variable. In SharePoint Designer, this action is in the **Virto Actions** category. ![Execute PowerShell script action added to a workflow step in SharePoint Designer 2013, with its sentence and default parameters](https://img-docs.virtosoftware.com/wp-content/uploads/2026/11/execute-powershell-script_1.png) ## **SharePoint Workflow Designer Phrase** Execute PowerShell script **this PowerShell script** and store result in **variable**. ## **Parameters** | Parameter | Description | |---|---| | this PowerShell script | The PowerShell script to run. | | variable | Workflow variable that receives the output of the script. | ## Account and permissions The script runs on the SharePoint server under the application pool account of the web application, or under the SharePoint Timer Service account when the workflow resumes after a pause. The script has the permissions of that account. Load the SharePoint cmdlets in the script if you need them. To return a value to the workflow, set `$context.Result`. Anyone who can publish workflows can run scripts under this account.