"EXECUTE_COMMAND" Command

Description: This command allows execution of an operating system-specific commands.
Usage Scenario: Suppose you want to print a message using echo command as can be done in the command line or powershell and store the message in a variable.

Procedure: Define your step and add 4 commands in the OS Native Command field.

Command Prompt:

Example (1): Typing a message using echo command

cmd or cmd.exe

/c

echo this is a test

Your step will look like this:

image-20240606-164229.png

On execution, your result will look like this:

image-20240606-164259.png

 

Example (2): Retrieving the default username on Windows for dynamic file verification purposes. This can be done by adding the commands below. Note that this will send a value back, so Variable option should be picked on the command and a variable name provided.

cmd or cmd.exe

/c

echo %username%

Your step will look like this:

On execution, your result will look like this:

Windows Powershell

powershell.exe or powershell

echo this is a test

Your step will look like this:

On execution, your result will look like this:

 

Â