Announcing PowerShell Universal v5

PowerShell PowerShell Universal

August 20, 2024

quote Discuss this Article

PowerShell Universal v5 is the next major release of the ultimate PowerShell command center. This blog post will walk you through the new features and improvements in this release. If you’d like to see a live demo, please join us at the Research Triangle Powershell User Group on August 21st, 2024.

Installation

You can download the latest version of PowerShell Universal from our downloads page. As this is a major upgrade, we highly recommend deploying to development environments first to ensure compatibility with your existing scripts and apps. You can find our upgrade guide here. This guide includes information on breaking changes and mitigation for any features that may have changed.

Features

Below, you’ll find a walk through of all the latest features.

New Admin Console

We’ve developed a new admin console based on Microsoft’s Blazor technology. This helps reduce technical debt by allowing our team to use C# and Razor to blend with our existing .NET code base. We’ve been able to move quickly and develop a robust console with more features than the previous version. Some of the new features include:

While the admin console is new, we’ve tried to keep the same look and feel as the previous version. This should make it easier for existing users to find what they are looking for.

End User Portal

As part of the new admin console, we’ve developed a new end user portal. The portal is a simplified user interface that allows end users to interact with PowerShell Universal apps, scripts, and widgets without having to learn the complexity of the admin console. The portal takes advantage of role-based access to provide resources to only the users that need them.

Portal Pages and Widgets

As part of the Portal development, we’ve introduced the concept of Portal Pages and Widgets. Portal Widgets take advantage of the same Blazor technology as the rest of the admin console. You can develop custom widgets using Razor XML syntax and PowerShell to create tables, interactive forms and more. The PowerShell Universal library provides pre-built widgets for consumption in your pages. Pages provide a visual designer for arranging and setting the properties of Widgets.

Script Library

The Ironman Software Script library provides pre-built solutions for PowerShell Universal. It’s open source and integrated directly into the platform. You can install the latest version of the library and then save library modules into your environment. This provides features like apps, widgets and scripts. Every resource is a module and can be easily added and removed without modifying the rest of your configuration.

Fine Grained Permissions

The authorization system has been overhauled to take advantage of a fine grained permission system. You can now assign permissions to individual users or groups to provide access to specific types of resources. This feature replaces Access Controls but provides full coverage across the platform. Additionally, existing role-based access takes advantage of these new permissions internally to ensure that a single mechanism is used to control access to resources.

New built-in groups have been added to allow for easier management of permissions without having to define custom roles.

PowerShell Universal Agent

The new PowerShell Universal Agent is the successor to the Event Hub Client. That said, it currently serves the same function as the Event Hub Client, to provide a way to run scripts on remote machines. As we continue to improve the platform, we will begin to expose more functionality to the agent, such as running scripts without the need for an entire PowerShell Universal instance.

Event Hubs have been enhanced to allow for execution of arbitrary commands on remote machines when the agent is connected. There isn’t a need to define a script to handle these commands.

Invoke-PSUCommand -Hub "Windows" -Command "Start-Process" -Parameters @{
    FilePath = "notepad.exe"
}

Changes to Database Support

Version 5 drops support for LiteDB in favor of SQLite. The latter is much more widely used and provides better performance and reliability. We’ve provided the psudb.exe tool to migrate from LiteDB to SQLite. More information on how to migrate databases can be found in our upgrade documentation. Additionally, we’ve added support for PostgreSQL. PostgreSQL is a powerful, open source database system. While PostgreSQL is free to use you will need a PowerShell Universal license to use it with the platform.

Persistent Caching

You can now use Set-PSUCache and Get-PSUCache to store data directly in the PSU database. This provides distributed caching as well as the ability to store data between restarts of the PSU service. We’ve also introduced role-based access to cache data to ensure that only the users that need access to the data can access it. Objects cached with Set-PSUCache are serialized with CLIXML and are rehydrated when retrieved with Get-PSUCache.

App Modules

Apps now contain a .psm1 PowerShell module file that you can use to define functions and variables that are available to the app. This reduces the amount of code you’ll need to write directly in your app.

Reduced Technical Debt

We’ve made big strides to help reduce technical debt within the platform. This includes removing features that are no longer used, refactoring code and consolidating functionality as much as possible.

Hosting Executables

We’ve developed new hosting executables that provide better compatibility with third-party modules. Rather than running features in pwsh.exe or powershell.exe by default, PowerShell Universal will use the new hosting executables that can take advantage of assembly loading order and other features that are not available in the default PowerShell host.

You can still use pwsh.exe for your scripts and apps but powershell.exe is no longer supported. This is replaced by the Windows PowerShell 5.1 environment.

gRPC Cmdlets

Our cmdlets now use gRPC to communicate with the PowerShell Universal service. This provides better performance and reliability than the previous REST API. It also ensures that we can use the same API surface for both internal and external communication. Additionally, role-based access is enforced for all API calls in a consistent manner.

We still provide the REST API and based on how our services are developed, can easily add gRPC and REST endpoints at the same time, with the same code.

Removed Desktop Support

Desktop support has been removed. Many users relied on this functionality to run PowerShell Universal locally, without having to install it as a service. It also provided features such as hotkeys, shortcuts and system tray icons. While these features were novel, they were not widely used and added complexity to the platform.

Instead, we’ve updated the PowerShell Universal installer to include the ability to perform user-mode installs that will run PowerShell Universal as a background process in the current user’s session. While it doesn’t provide the same desktop features, it does provide a way to run PowerShell Universal without having to install it as a service.

Increased Test Coverage

We are taking advantage of Pester, Playwright, bUnit and ASP.NET Core Integration Testing to increase our test coverage. Over 50% of the v5 code-base is currently tested on a nightly basis and we aim for at least 75% in the coming months. This helps us move faster and more confidently when developing new features without breaking existing ones.

We’ll be releasing a blog post in the future that goes into more detail about how we are testing PowerShell Universal.

Redesigned Configuration System

We’ve replaced our in-memory configuration system with a temporary SQLite database. This allows for relational data to be stored in the configuration system. In addition to the benefits of using such a data storage paradigm, it also provides the plumbing for a configuration system that can be distributed across multiple nodes without the need for git.

It also means all our data access uses the same Entity Framework context to provide a consistent and reliable data access layer.

There’s more!

This is just a subset of the new features available in PowerShell Universal v5. We’ve also added:

What’s Next?

Known Issues

We already have some known issues that our users have reported. We’ll be working on 5.0.1 over the next few weeks. We anticipate a few more bugs will come in and make it into this release. Please check the milestones page to see what we are currently working on.

PowerShell Universal v4.4.0

We will be releasing a final minor release for version 4.x. This will include a few requested features that were added to v5 that our customers have requested be added to v4. This should be out sometime next month.

PowerShell Universal v4 is supported until June 2026.

PowerShell Universal v5.1.0

We’ve already pulled out a v5.1 milestone and have started to add features to it. This release will happen sometime next year with improvements to v5 that we didn’t have time to add to the initial release and new items that are requested by our customers.

Translations for v5

While we have translation support in the admin console, we do not have a full set of string translations for any languages. We’re looking for feedback on which languages we should support first. Please response to this GitHub issue with the languages you would like to see supported.

Updated Educational Content

We will be updating our training course to focus on v5. This will include new lessons and updated videos based on the new features in v5. We will also be adding new solutions to the script library to provide examples and templates for users to get up and running quickly. Feel free to contribute.

Feedback

As excited as we are, we know you will have feedback. As always, please open topics on our forums or issues on our GitHub repository.

Resources