/
Run a Powershell Script using Studio Workflow
Run a Powershell Script using Studio Workflow
Overview
You can use Studio's Workflow Tasks to run a Powershell script. For the purposes of this example we will use the DeleteFiles Powershell script.
Create a Program Workflow Task
Name
Enter a unique name for your task. It is advisable to call this something relevant as this name will be used to populate list box selections when creating Jobs.
Details
Program
Use the browse button to select the powershell.exe program from the Windows folder e.g. c:\windows\syswow64\windowspowershell\v1.0\powershell.exe
Additional Parameters
Here you need to enter the following details:
Additional Parameters
-ExecutionPolicy Bypass <path to powershell script> <any parameters required by the script>
For example in the case of the DeleteFiles script :
Example
-ExecutionPolicy Bypass d:\astun\Tools\Powershell\DeleteFiles.ps1 -path d:\astun\isharemap\webservice\sld\ -filespec *.xml -age 1 -commit $true
, multiple selections available,
Related content
Run the DeleteFiles Powershell Script
Run the DeleteFiles Powershell Script
More like this
Remove SLD files over a certain size
Remove SLD files over a certain size
More like this
Remove MapServer / PostgreSQL & iShare temporary files with Studio Workflow
Remove MapServer / PostgreSQL & iShare temporary files with Studio Workflow
More like this
Configure a VB Script Task
Configure a VB Script Task
More like this
Workflow Jobs
Workflow Jobs
More like this
Workflow WFS Configuration
Workflow WFS Configuration
More like this