Portal Widgets
Information about creating portal widgets.
Widgets are user interfaces blocks built with PowerShell and Blazor. You can create robust web-based used interfaces with minimal web development experience.
Built In Widgets
PowerShell Universal offers built in widgets to integrate with other features in the platform to display UI elements.
Script Form
Provide a form to end users to run scripts. The selected script will need a role defined under the Portal tab in the script's properties. If the script is not available to the user based on role, they will no be able to see the form.
Script Table

The script table widget will display a table based on the last output of a script. This selects the most recent job and generates the table based on the properties of the objects returned. For example, try running a script that returns processes on the current machine.
Get-Process | Select-Object Name, Id
Script Pie Chart

The script pie chart widget displays a chart based on data from the last run of a script. The script needs to output data in a particular format in order to define the chart's slices. Below is an example of how to generate data for a pie chart.
1..5 | ForEach-Object {
[PSCustomObject]@{
type = "Category $_"
value = Get-Random -Min 5 -Max 60
}
}
In the properties for the pie chart widget, set the Category Property to type
and the Value Property value
.
Script Line Chart

The script line chart widget displays a chart based on data from the last run of a script. The script needs to output data in a particular format in order to define the chart's lines. Below is an example of how to generate data for a line chart.
1..5 | ForEach-Object {
[PSCustomObject]@{
type = "Category $_"
value = Get-Random -Min 5 -Max 60
}
}
In the properties for the line chart widget, set the XProperty to type
and the YProperty to value
.
Pre-built Widgets
You can find widgets created by Ironman Software and community members on the PowerShell Universal Gallery.
Custom Widgets
You can develop your own custom widgets using PSBlazor. PSBlazor employs Razor-like syntax combined with PowerShell to allow for creating fully interactive and customizable components.
Last updated
Was this helpful?