No description
  • PowerShell 99.8%
  • CSS 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
yarrith 90417e0e8b Fix login: make app functions visible in Pode runspaces
Pode's auto-import skips any function named like '*-Pode*', so none of the
app's -PodeDemo* helpers existed in the runspace that runs the auth validator.
The validator threw, and Pode treated that as a failed login.

- rename -PodeDemo* functions to -Demo* (src, tests, docs)
- load src/*.ps1 into Pode runspaces with Use-PodeScript
- Get-DemoConfig: take the root from PODE_DEMO_ROOT, since $PSScriptRoot is
  empty inside runspace copies of functions; app.ps1 sets it
- drop a dot-source of Jobs.ps1 inside Invoke-DueSchedules for the same reason

Verified over HTTP: bad password redirects to /login, good password redirects
to / and the home page returns 200. Pester not run (v5 not installed here).
2026-10-19 10:58:07 +02:00
config Add gated auth diagnostics to pin down the failing login 2026-10-17 11:12:37 +00:00
docs Fix login: make app functions visible in Pode runspaces 2026-10-19 10:58:07 +02:00
public Add Pode + Pode.Web PowerShell automation portal demo 2026-10-16 17:22:32 +00:00
scripts Support Windows PowerShell 5.1 alongside PowerShell 7 2026-10-16 18:20:28 +00:00
src Fix login: make app functions visible in Pode runspaces 2026-10-19 10:58:07 +02:00
tests Fix login: make app functions visible in Pode runspaces 2026-10-19 10:58:07 +02:00
tools Fix login: resolve auth data inside deferred Pode scriptblocks 2026-10-16 19:33:38 +00:00
.gitignore Add Pode + Pode.Web PowerShell automation portal demo 2026-10-16 17:22:32 +00:00
app.ps1 Fix login: make app functions visible in Pode runspaces 2026-10-19 10:58:07 +02:00
LICENSE Add Pode + Pode.Web PowerShell automation portal demo 2026-10-16 17:22:32 +00:00
README.md Support Pode.Web 1.0.x alongside 0.8.x 2026-10-16 18:46:44 +00:00

Pode-pwsh-demo

A small, self-hosted PowerShell automation portal built with Pode and Pode.Web — a free, MIT-licensed demonstration of what you can build without a commercial platform.

Everything runs locally. Nothing phones home.


Requirements

  • Windows PowerShell 5.1 or PowerShell 7.0+ (pwsh) — one codebase, both run
  • The Pode and Pode.Web modules (Pode.Web 0.8.x or 1.0.x)
Install-Module Pode      -Scope CurrentUser
Install-Module Pode.Web  -Scope CurrentUser

Windows PowerShell 5.1 is Windows-only, so use PowerShell 7 for Linux/macOS. Compatibility rules: docs/ARCHITECTURE.md.

Tested versions

Built against Pode 2.14.1 with Pode.Web 0.8.3 (stable) and Pode.Web 1.0.0-preview3. Both work — the two cmdlets that differ between them (Set-PodeWebHomePage and Out-PodeWebTextbox) are handled by a shim in src/Compat.ps1. Pode.Web 1.0.0 is still a preview, so behaviour may change. The 5.1 compatibility pass is lint-checked, but the app has not yet been run on a 5.1 host — use tools/Test-SmokeTest.ps1 there.


Quick start

git clone ssh://git@forgejo.vosjes.cloud/yarrith/Pode-pwsh-demo.git
cd Pode-pwsh-demo

pwsh ./app.ps1                    # PowerShell 7
powershell.exe -File .\app.ps1    # Windows PowerShell 5.1

Then open http://localhost:8080 and sign in. ./tools/Test-SmokeTest.ps1 checks a host end to end (parses, tests, then the live API).

# bind elsewhere / change the port
pwsh ./app.ps1 -BindAddress 0.0.0.0 -Port 8090

Demo accounts

These exist so the demo is usable out of the box. The passwords are stored as salted SHA-256 hashes in config/users.psd1, never in plaintext — but they are still well-known demo credentials, so change them before exposing this to anything.

User Password Role Can do
admin pode-admin Admin Everything: add/edit/delete scripts, manage schedules, run anything
operator pode-operator Operator Run any script, manage schedules, view jobs
viewer pode-viewer Viewer View dashboards and jobs, run self-service scripts only

Generate a new account entry with:

pwsh ./tools/New-PasswordHash.ps1 -Password 'correct horse battery staple'

It prints a Role / Salt / PasswordHash block — paste it into config/users.psd1 under a username key and set Role to Admin, Operator or Viewer.