Execute PowerShell script
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.

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.