Executing Workflows

OpManager's IT workflow automation allows you to automate repetitive tasks and processes efficiently. By leveraging a simple drag-and-drop interface, you can easily create a workflow tailored to your specific needs and configure the criteria for its execution. This documentation will guide you through the steps to execute a workflow in OpManager.

To execute a workflow

Before executing a workflow, ensure that you have associated the workflow to the respective devices.

  1. Click on the Workflow tab. Here, all the created workflows will be listed.
  2. Click against the "Execute" icon on the respective workflow, and then select the devices in which the workflows must be executed.

    Executing workflow in OpManager: All workflows

  3. There is also an option to execute the workflow from the respective device's snapshot page. Go to the Device snapshot page, and then click on the "Workflow" icon at the top-right corner of the page, and then click on the "Execute" option of the respective workflow.

    Executing workflow in OpManager: Associate workflows

How can I run a PowerShell script using Execute Windows Script task in Workflow?

  1. Go to Workflow > New Workflow > External Actions > Execute Windows Script.

    Executing workflow in OpManager: Drag and drop workflow

  2. Drag and drop the Execute Windows Script action into the workspace. A configuration pop-up will appear. Fill in the following fields:

    • Name — Enter a descriptive name for this action (e.g., Execute Windows Script).
    • Destination Device — Choose where the script should run:

      • Localhost — Runs the script directly on the OpManager server.
      • Remote — Runs the script on a remote device. This option is supported only for agent-monitored devices. The script is sent and executed directly on the end device through the installed monitoring agent. Enter the target device name or use the variable ${DeviceName} to resolve it dynamically from the triggering device.
      Note: Since Remote execution is supported only for agent-monitored devices, ensure the OpManager agent is installed and running on the target device before selecting this option — no additional credentials are required.
    • Command Line — Specify the command used to invoke the script file, for example: cscript //Nologo ${FileName}.vbs

    If Remote was selected in the previous step, ensure the OpManager monitoring agent is installed and running on the target device. The script is sent and executed through the agent — the device must be reachable and agent-monitored for remote execution to succeed. Also ensure that the communication between the Monitoring Agent and the OpManager Server is happening seamlessly for effective script execution.

  3. In the Script Body field, enter the PowerShell script below. This VBScript wrapper launches PowerShell and runs your .ps1 file:

    Set objShell = CreateObject("Wscript.Shell")
    objShell.Run("powershell.exe -noexit c:\scripts\test.ps1")

    Executing workflow in OpManager: Execute windows script

  4. Click OK to save the action and add it to your workflow.

To gain in-depth insights into OpManager's automated workflows, explore the following help documents.