PowerShell Universal v5.0 Portal Pages and Widgets

PowerShell Universal

July 2, 2024

quote Discuss this Article

PowerShell Universal v5 provides and entirely new admin console and portal experience. We’ve used the Microsoft Blazor technology to create a more responsive and interactive experience for users and reduce the technical debt of the platform. During our final push before the v5 general availability release we’ve added one more feature. Historically, apps (formerly dashboards) and, less so, Pages, were the primary way to provide a UI experience to end users. With PowerShell v5, we’ve added a new feature called Portal Pages and Widgets to allow for more customization and flexibility in the user interface with minimal effort but maximum flexibility.

Portal Widgets and PSBlazor

As we previously discussed, we have been developing a technology called PSBlazor to allow for integration between PowerShell modules and Blazor components. Until now, this surfaced in PowerShell Universal as Blazor Apps. While we found the technology interesting, it was confusing as it didn’t provide the same level of customization as the current app framework. Instead, we decided to merge Blazor Apps into the PowerShell Universal Portal as customizable widgets.

Each widget will consist of a Blazor component razor file and a PSM1 PowerShell Module. The Blazor syntax provides the UI components while the PowerShell module provides the data and logic for the component.

Widgets can expose properties that configure the end user experience without the need for coding an entirely new Widget.

Widgets are self contained and do not interact with other widgets. Each has its own runspace and state. When shared, Widgets provide easy to use and reusable components that can be used across multiple pages without the need to write any code. Using our new Scripts repository, we hope to share Widgets with the community to provide a library of components that can be used in your own applications. We’ll also be shipping several Widgets with the v5 release.

These might include:

In addition, we are considering including Widgets with some of our existing modules like Active Directory and Local Accounts to provide more specific UI elements.

Portal Pages

Portal Pages are the container for Widgets. You can create a new Portal Page and add Widgets to the page. Pages can control the layout and role-based access. They will appear in the Portal just as other resources, like Scripts and Apps, do.

Conclusion

We are releasing Pages and Widgets in preview to see how the community uses them and to gather feedback. Expect improvements to the Widget and Page editing experience and please provide feedback on GitHub.