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
Localmode to run scripts on the Local Runtime host. - For
Remotemode, configure a reachable WSMan endpoint, username, and password. SetRemotingShellUrionly when the endpoint requires a non-default shell. - Enter one PowerShell snap-in name per line in
SnapInswhen 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
Noneconcatenates each pipeline object's base-object string representation.Textpipes each script line toOut-Stringand returns the resulting text.FormatListpipes each script line toFormat-Listand returns the resulting text.Serializedreturns aFlowgearstatus object and aResultarray containing serialized pipeline objects.- In
Serializedmode,Flowgear.Requestechoes 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.