WindmillWWindmill
Powered by
Trevor SullivanT
Windmill•3y ago•
1 reply
Trevor Sullivan

Native script editor for PowerShell

Would it be possible to directly edit PowerShell scripts, instead of embedding them in Bash here-strings?

PowerShell supports special syntax, such as multi-line commands, using the backtick as the "line continuation" character. Using this syntax, and perhaps others, breaks the Bash parser.

All you'd have to do is write the text from the editor to a file, and then execute the
pwsh -File
pwsh -File
command instead of executing Bash.

cat > script.ps1 << EOF
Write-Host -Object 'Multi' `
  'Line' `
  'Command'
EOF

pwsh -File script.ps1
cat > script.ps1 << EOF
Write-Host -Object 'Multi' `
  'Line' `
  'Command'
EOF

pwsh -File script.ps1
image.png
WindmillJoin
3,362Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Recent Announcements
henri-c

Weekly kenote to tell you about our latest updates https://discord.com/channels/930051556043276338/1278977038430240813 https://youtube.com/live/2dGd9TdT8xs?feature=share

henri-c · 4d ago

Pyra

### HTTP tracing (EE) Capture HTTP requests made by job scripts as observability spans Features: - View HTTP request traces (method, URL, status, timing) in the job details UI - Auto-instrumentation for Native TypeScript, MITM proxy for other languages - Integrates with external OpenTelemetry collectors changelog: https://www.windmill.dev/changelog/http-tracing docs: https://www.windmill.dev/docs/advanced/instance_settings#http-tracing Additionally jobs memory metrics are now fully OSS!

Pyra · 2w ago

henri-c

First keynote of the year here https://discord.com/channels/930051556043276338/1278977038430240813 🙂

henri-c · 4w ago

Similar Threads

Test powershell script on worker
AlainAAlain / help
6mo ago
Powershell script with PNP.Powershell module - How to connect with PFX SSL Certificate ?
Grégory LASSERREGGrégory LASSERRE / help
12mo ago
How can I run a PowerShell script inside Windmill?
Trevor SullivanTTrevor Sullivan / help
3y ago
Sourcing PowerShell scripts from other PowerShell scripts
DannlyDDannly / help
2y ago