Before executing a workflow, ensure that you have associated the workflow to the devices. To execute a worklow
- Click on Workflows from the left pane. All the created workflows are listed.
- Click against the Execute icon on the respective workflow.
- There is also an option to execute the workflow from the device page. Go to Device page > Workflow > click against the execute icon on the respective workflow.
How can I run a powershell script using Execute Windows Script task in Workflow?
- Go to Workflow > New Workflow > External Actions > Execute Windows Script.
- Drag and drop the Execute Windows Script action into the workspace. In the pop-up, configure the Name, Destination Device and Command Line.
- In Script Body, enter the powershell script shown below:
Set objShell = CreateObject("Wscript.Shell")
objShell.Run("powershell.exe -noexit c:\scripts\test.ps1")
- Click OK.