PowerShell Universal v5.0 Beta 2

PowerShell Universal

April 10, 2024

quote Discuss this Article

Today, we are happy to announce the second beta of PowerShell Universal v5. This version builds on the first beta, including new features and fixes based on user feedback.

Download Now

API Test Tab

We’ve extended the API testing capabilities of PowerShell Universal with a new API Test tab. This tab allows you to test your APIs directly within the admin console. You can pass in variables, headers, body content and more. The results of the test are displayed directly within the console.

We are considering adding test history and repeatable tests in the future.

Terminals

Terminals are now supported in the new admin console. You can execute commands and view historical instances of terminal sessions.

Module Updates

PowerShell Universal now checks for updated modules in the PowerShell Gallery. You can update modules directly from the admin console. This feature is optional and will have to be enabled in the general settings page.

New Health Check

PowerShell Universal now verifies that the executables configured in environments are present on the machine. Updates to Windows and PowerShell 7 have caused issues in the past and can be hard to diagnosis. You can pair this with the new health check failure trigger to send notifications in this case.

Internals

Much of the work done from beta1 to beta2 has been internal. We’ve updated several internal components of PowerShell Universal to improve performance and stability.

Database Layer

We’ve unified our database layer to reduce complexity. In version 4, we had three separate database implementations.

In version 5, we have one implementation that uses Entity Framework Core. The data context is the same for the configuration data (explained in the next section), SQL, SQLite and PostgreSQL. Version 5 does not support LiteDB. We’ve also spent time to implement better management of database connections to improve performance and avoid issues when holding them open for long periods of time.

Configuration Database

In previous versions of PowerShell Universal, we used a custom, in-memory database to store configuration information like endpoints, scripts, schedules and more. Anything that was in a configuration .ps1 file would be stored like this. The problem was that the database was not relational. This led to complexity and bugs during configuration. We’ve moved to a temporary SQLite database to store configuration information. Each time PSU starts, it creates a new configuration database based on the PS1 files in the .universal folder. This will allow us to more easily query and manage configuration data and reduce the overall code necessary to configure the platform.

Configuration Files

By updating the configuration system to use a relational database, in turn, we can use the same layer to manage configuration data and store it directly in the persistent, shared database. This means that configuration files are now optional. This simplifies multi-node deployments by removing the need to sync configuration files between nodes using git sync. While this isn’t fully implemented, it will be in the final release of v5. We have temporarily disabled the file system watcher while we work through the final implementation. Below is an example of how persistence settings will appear in v5. This is subject to change as we work with, and test, the feature.

Optimized Build and Test

We’ve optimized our workflow pipelines to improve the build and test process. Builds run about 2x as fast as version 4. Additionally, we have improved our integration test framework to run about 4x as fast with more coverage and less flakiness. This will allow us to move faster and more confidently with our development process. We’ll be blogging about this soon.

And more!

We’ve added a number of other features and improvements to this version. Some of these are new while some are just implementations of existing functionality in version 4.

Conclusion

As always, please leave feedback on our GitHub page or forums. We are excited to get this release into your hands and hear your feedback. We expect beta 3 to be released next month.