command line.md


version: "2026.1.0" language: "en"

Command-line

The Command-line block is used to execute system commands as part of a flow. It can run scripts (for example PowerShell or batch files), return dynamic data to be used elsewhere in the case, and integrate with external tools or systems via the command line.

See the Command-line tutorial to see examples of how to use the command-line block in test cases.

Fully expanded, the Command-line block looks like this:

Note: The screenshot on this page uses the Elegance Design , introduced in 2025.3. If you are using an earlier version, your layout may look different.

Quick-start

  1. Drag Command-line onto the canvas.
  2. Enter the basic settings you need for this step, such as Command , optionally Working folder , and choose the Method (Get as text or Iterate ). Add credentials in Run as / Password if the command must run under a specific user.
  3. Run the flow when it's ready; use Text result or the iterative outputs, plus Return code, in downstream blocks.

Building block parameters

Parameters

Resources

Topic Description
Flows FAQ Common questions about creating, running, and managing flows in Leapwork.
Flows Troubleshooting Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.