"InvokePowerShell" Activity

Created by akaBot Support, Modified on Thu, 23 Jan at 5:42 PM by akaBot Support

TABLE OF CONTENTS

  1. Activity program name
  2. Description
  3. Properties
  4. How to use

1. Activity program name

RCA.Activities.Core.InvokePowerShell

2. Description

  • Up to Studio version 2.0.2.0:
    Quick Access: "Toolbox" > "Invoke" > "Invoke PowerShell"

  • From Studio version 2.0.3.0:
    Quick Access: "Toolbox" > "Core" > "Invoke" > "Invoke PowerShell"

This activity allows you to execute PowerShell commands.

Tested on Studio versions: 2.0.4.0, 2.1.0.0
Note: Descriptions and terms may vary depending on the version.

3. Properties


Property Item

Property Name

Input Field

Description

Misc

PowerShell Variables

Enter Value

Represents a dictionary of named objects (arguments) used within the current session of the command.

TypeArgument

Dropdown Selection

Allows selecting any type.

Is Script

Checkbox

Check this if the command text is a script.

Public

Checkbox

If checked, variables and arguments within the activity are written to log files and pushed to Center. (Refer to "About Public Property.")

Display Name

Any string

Reflected as the activity name on the Designer panel.

General

Continue on Error

Enter Value (Boolean)

Specifies whether the process should continue after an error occurs.

Output

Output

Enter Value (Collection Type)

A collection of TypeArgumentObject returned by executing the command.

Input

Command Text

Enter Value (String)

The PowerShell command to execute.

Parameters

Enter Value

Configures the option names predefined in PowerShell.

Input

Enter Value (Collection Type)

Specifies a collection of PSObject used during command execution.


4. How to use

In this section, we’ll walk through how to use the "Invoke PowerShell" activity to open Notepad.

There are two main configuration methods:

  1. Setting the Script Property

  2. Configuring the Parameters Property



Method 1: Using the Script Property


Drag and drop the "Core" > "Invoke" > "Invoke PowerShell" activity from the Toolbox into the Designer panel.

 In the Properties panel: Check the "Is Script" property


     

Enter the following command in the "Command Text" field: "Start-Process -FilePath C:\Windows\System32\notepad.exe"


       


Execute the workflow by clicking "Home > Start" or pressing F5.


Result: Notepad will launch.

 



Method 2: Configuring the Parameters Property


Drag and drop the "Core" > "Invoke" > "Invoke PowerShell" activity from the Toolbox into the Designer panel.

In the Properties panel:

              Enter the following command in the "Command Text" field: "Start-Process"



Configure the "Parameters" property:

  • Click the "..." button next to the "Parameters" field.

  • In the Parameters panel, set the following:

    • Name"FilePath"

    • Value"C:\Windows\System32\notepad.exe"

Note: The Name must match the option names predefined in PowerShell. For details on the Start-Process command, refer to the official Start-Process (Microsoft) documentation.

Execute the workflow by clicking "Home > Start" or pressing F5.

Result: Notepad will launch.

 





Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article