All templates
ScriptingIntermediate
Display PowerShell Output
Robomotion•Updated 9 months ago

Overview
Runs a PowerShell script and displays the captured standard output in a dialog.
Display PowerShell Output
PowerShell is a cross-platform shell and scripting language that allows users to interact with the operating system. Flows support the implementation of PowerShell scripts to retrieve system information and automate administrative operations.
What Display PowerShell Output can do
- Run PowerShell script (
Core.Process.StartProcess) — runspowershellwith-NoProfile -Command '$variableName = "Hello World!"; Write-Output $variableName', captures stdout intomsg.powershell_output. - Trim output (
Core.Programming.Function) — strips trailing CR/LF frommsg.powershell_output. - Message Dialog (
Core.Dialog.MessageBox,optType: info) titledOutput from PowerShell script:showsmsg.powershell_output, thenCore.Flow.Stop.
Behind the scenes
Write-Outputsends the value on the success stream;Core.Process.StartProcesscaptures it as stdout. A bare$variableNameline would behave identically — the explicit form is kept for clarity.-NoProfileskips the user's PowerShell profile so the script starts faster and stays deterministic across machines.- The captured text typically has a trailing CR/LF, which the Function node trims before the dialog.
More scripting templates
See all 7 →- Convert Excel to PDF Using VBScriptRuns an inline VBScript that drives Excel COM to export a workbook as PDF. Shows how to bridge Robomotion with Windows scripting.
- Display JavaScript OutputExecutes an inline JavaScript snippet and surfaces its return value in a dialog. Demonstrates the JavaScript Run node.
- Display Python OutputRuns an inline Python script and shows its output in a dialog. Demonstrates the Python Run node.
- Display VBScript OutputExecutes a VBScript snippet and displays its output. Useful when integrating with legacy Windows tooling.
- Extract Text from Word DocumentUses a VBScript bridge to pull raw text out of a .docx file for downstream NLP or search indexing.
- Get Login Name Using PythonRetrieves the current Windows login user via an inline Python script. Handy for audit trails or user-scoped paths.