- PowerShell 99.8%
- CSS 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
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). |
||
| config | ||
| docs | ||
| public | ||
| scripts | ||
| src | ||
| tests | ||
| tools | ||
| .gitignore | ||
| app.ps1 | ||
| LICENSE | ||
| README.md | ||
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.