PowerShell Universal
DownloadsIssuesDiscordForums
v5
v5
  • ❓About
  • 🆕What's New in v5?
  • ⏯️Get Started
  • 📺Video Library
  • 📚Additional Resources
  • ⬇️Installation
    • Docker
    • Upgrade
    • Uninstall
    • Downgrade
    • Migrate and Restore
  • 🔑Licensing
  • 📊System Requirements
  • 🌐Supported Browsers
  • Cmdlet Help
  • 🔌API
    • About
    • Endpoints
    • OpenAPI
    • Event Hubs
    • Security
    • Error Handling
    • Rate Limiting
  • 🤖Automation
    • About Automation
    • Scripts
      • Parameters
    • Jobs
    • Schedules
    • Terminals
    • Tests
    • Triggers
  • 📊Apps
    • About
    • Apps
    • Components
      • Pages
      • Data Display
        • Alert
        • Badge
        • Chip
        • Data Grid
        • Date and Time
        • Icon
        • List
        • Markdown
        • Table
        • Timeline
        • Tooltip
        • Tree View
        • Typography
      • Data Visualization
        • Charts
        • Image
        • Map
      • Feedback
        • Backdrop
        • Modal
        • Progress
        • Skeleton
      • Inputs
        • Autocomplete
        • Button
        • Checkbox
        • Code Editor
        • Date Picker
        • Editor
        • Floating Action Button
        • Form
        • Radio
        • Rating
        • Select
        • Slider
        • Switch
        • Textbox
        • Time Picker
        • Transfer List
        • Upload
      • Navigation
        • Drawer
        • Link
        • Menu
        • Stepper
        • Tabs
      • Layout
        • Grid Layout
        • Grid
        • Hidden
        • Stack
      • Utilities
        • Dynamic Regions
        • Element
        • Error Boundary
        • Protect Section
        • Transitions
        • HTML
      • Surfaces
        • AppBar
        • Card
        • Paper
        • Expansion Panel
      • Custom Components
        • Building Custom JavaScript Components
    • Custom Variable Scopes
    • Interaction
    • Role Based Access
    • Scheduled Endpoints
    • Sessions
    • Static Apps
    • Themes
      • Colors
      • Cascading Style Sheets
      • Styles
  • 🌐Portal
    • About the Universal Portal
    • Portal Pages
    • Portal Widgets
      • Syntax
      • Conditions
      • Dynamic
      • Forms
      • Properties
      • Services
      • Tables
  • 🏗️Platform
    • Cache
    • Computers
    • Health Checks
    • Gallery
    • Middleware
    • Modules
    • Monitoring
    • Notifications
    • Plugins
    • Published Folders
    • Tags
    • Telemetry
    • Translations
    • User Sessions
    • Variables
  • 🔒Security
    • About
    • Local Accounts
    • Forms Authentication
    • Authorization
    • App Tokens
    • Enterprise Security
      • Client Certificate
      • OpenID Connect
      • SAML2
      • WS-Federation
      • Windows SSO
      • Permissions
  • ⚙️Configuration
    • Agent
    • App Settings
    • Best Practices
    • Branding
    • Command Line Options
    • Deployments
    • Environments
    • Feature Flags
    • Git
    • Hosting
      • Azure
      • High Availability
      • IIS
      • Reverse Proxy
    • Management API
    • Module
    • Persistence
    • psu Command Line Tool
    • Repository
    • Running as a Service Account
  • 👩‍💻Development
    • Debugging Scripts
    • Editor
    • Hangfire
    • Logging
    • Profiling
    • Visual Studio Code Extension
  • Changelogs
    • Changelog
    • Extension Changelog
    • Roadmap
    • CVEs
Powered by GitBook

PowerShell Universal

  • Downloads
  • Pricing
  • Gallery

Community

  • Issues
  • Forums
  • Discord

Support

  • Portal
  • Knowledgebase

Copyright 2025 Ironman Software

On this page
  • Building a Static App
  • Publishing a Static App
  • Limitations
  • No App Interaction
  • No PowerShell Host Interaction
  • Limited Control Support

Was this helpful?

Edit on GitHub
Export as PDF
  1. Apps

Static Apps

Build static web apps with PowerShell Universal.

Static PowerShell Universal apps do not require the PowerShell Universal server to run. They can be hosted on simple web servers like Azure Blobs or in IIS directly from the file system. They consist of the PowerShell Universal App JavaScript framework and a series of JSON files created during the publish process. Static apps do not support PowerShell Universal's interactive features. They do support running JavaScript.

Building a Static App

The Publish-PSUStaticApp cmdlet is responsible for building an app. You can use standard App cmdlets in the definition. For example, the below would create an app in the output folder with a single UDRating component.

Publish-PSUStaticApp -Definition { 
    New-UDApp -Content { 
       New-UDRating -Max 10 
    } 
} -DestinationPath .\output -Force 

You can also introduce JavaScript call into your app anywhere that an endpoint can be used. For example, in the -OnChange parameter of New-UDRating. The data variable will contain the data from the event.

Publish-PSUStaticApp -Definition {
   New-UDApp -Content {
      New-UDRating -Max 10 -OnChange (New-UDEndpoint -JavaScript 'alert(data)') 
   } 
} -DestinationPath .\output -Force 

Publishing a Static App

Static apps can be published to any webserver that can server HTML, JavaScript and CSS files. You will need to publish the entire output folder's contents for the app to work.

Limitations

No App Interaction

You cannot use interactive features of PowerShell Universal Apps, besides JavaScript. This includes but not limited to:

  • Modals and toasts

  • -UDElement Cmdlets

  • Data Providers like $Cache and $Session

No PowerShell Host Interaction

During the building of the app, all the script blocks within the app will run, rather than run on demand, like when hosted in PowerShell Universal. This means that commands such as Write-Host and Write-Error will happen during the building and not when the app is running in the browser. The following will also run immediately:

  • Read-Host

  • PromptForChoice

  • Get-Credential

Limited Control Support

Although it is possible to use any control and specify the JavaScript for it's interaction, it is not recommended due to the complexity. Controls that should be avoided include:

  • Data Grid

  • Dynamic Region

  • Protect Section

PreviousSessionsNextThemes

Last updated 4 months ago

Was this helpful?

📊