Pglet ("piglet") is a rich user interface (UI) framework for scripts written in PowerShell or any other language. Pglet renders web UI, so you can easily build web apps with PowerShell. Knowledge of HTML/CSS/JavaScript is not required as you build UI with controls. Pglet controls are built with Fluent UI React to ensure your programs look cool and professional.
- Windows PowerShell 5.1
- PowerShell Core 7 on Windows, Linux or macOS
Install pglet
module from PowerShell Gallery:
Install-Module pglet
Create a new hello.ps1
with the following content:
Import-Module pglet
Connect-PgletPage
Invoke-Pglet "add text value='Hello, world!'"
Run hello.ps1
in your PowerShell session and in a new browser window you'll get:
Here is a local page served by an instance of Pglet server started in the background on your computer.
Add -Web
parameter to Connect-PgletPage
call:
Connect-PgletPage -Web
Invoke-Pglet "add text value='Hello, world!'"
This time page will be created on Pglet hosted service.
Read PowerShell tutorial for further information and more examples.