PowerShell

The PowerShell Node executes Windows PowerShell 5.1 scripts locally on a Windows Local Runtime or remotely through WSMan.

Revision History

0.1.0.2 - Initial V2 release with local and remote execution and selectable output handling.

Connection

Use this Connection to select local or remote execution and configure optional snap-ins.

Property Type Description
Connection Mode PowerShellConnectionMode Selects Local execution on the Local Runtime host or Remote execution through WSMan. The default is Local.
Username String WSMan username shown and required when Connection Mode is Remote.
Password Masked WSMan password shown and required when Connection Mode is Remote.
SnapIns String Newline-delimited PowerShell snap-in names loaded before execution.
RemotingUri String Absolute WSMan endpoint shown and required when Connection Mode is Remote.
RemotingShellUri String Optional WSMan shell URI shown when Connection Mode is Remote.

Setup Notes

  • Deploy this Node to a Windows Local Runtime that has Windows PowerShell 5.1 available as powershell.exe.
  • Use Local mode to run scripts on the Local Runtime host.
  • For Remote mode, configure a reachable WSMan endpoint, username, and password. Set RemotingShellUri only when the endpoint requires a non-default shell.
  • Enter one PowerShell snap-in name per line in SnapIns when scripts require snap-ins that are not loaded by default.

Methods

The Node exposes one Execute method. Choose the output mode on each Step so the same Connection can support text or structured responses.

Execute

Executes the supplied PowerShell script.

Parameter Type Description
Connection Connection PowerShell Connection controlling execution mode and snap-in loading.
Script String Exact PowerShell script to execute.
OutputHandling PowerShellOutputHandling Output mode: None, Text, FormatList, or Serialized.
Return Type Description
Output Object Text for None, Text, and FormatList, or a structured object for Serialized.

Usage Notes

  • None concatenates each pipeline object's base-object string representation.
  • Text pipes each script line to Out-String and returns the resulting text.
  • FormatList pipes each script line to Format-List and returns the resulting text.
  • Serialized returns a Flowgear status object and a Result array containing serialized pipeline objects.
  • In Serialized mode, Flowgear.Request echoes the complete script text. Do not embed credentials or other secrets in the script.

Known Issues

  • The Node requires Windows PowerShell 5.1 and does not run on Linux Local Runtimes.
  • Remote execution depends on a correctly configured and reachable WSMan endpoint.