PowerShell Universal v5.0 Beta 3

PowerShell Universal

April 29, 2024

quote Discuss this Article

Today, we are happy to announce the third beta of PowerShell Universal v5. Information about the previous betas can be found here:

You can download the latest version of PowerShell Universal from our website.

Download Now

Permissions

We’ve added granular permissions to PowerShell Universal. This replaces the previous access control system and builds onto existing role-based access. Permissions can be assigned to identities and roles to control access to specific features of PowerShell Universal. Permissions are stored within the database and not part of the configuration files.

Note, we still have some work to ensure that all components within the admin console are properly protected by the new permissions system. gRPC cmdlets and the REST API are protected but may change in future releases. We’ve done a review of all the external endpoints in PSU but may add or change certain permissions for built in roles or features in coming releases.

Default roles also have a basic set of permissions. They are read-only. In a future release, you will be able to adjust permissions for custom roles. We’ll also be adding more built-in roles to focus on particular parts of the system. You’ll likely be able to use nested roles to avoid having to configure many permissions yourself.

Inline Script Debug Terminal

We’ve added an inline script debug terminal to PowerShell Universal. Including a Wait-Debugger cmdlet in your script will pause execution and allow you to debug the script directly within the admin console. The script will enter an in breakpoint state and the terminal will be available for debugging. You can use debugging commands like Get-PSCallstack, c, v and more to interact with the script.

We anticipate enhancing this feature in the future by allowing adding breakpoints via the editor and exposing debugging tools like stepping, variable views and more. It’s also likely we will add contextual debugging to apps and APIs.

Module Editor

We’ve re-added the module editor to v5. This feature was previously available in v4 and has been re-implemented in v5. The module editor allows you to edit and create PowerShell modules directly within the admin console. We’ve also added a new manifest editor tab to allow for changing the contents of the module manifest.

gRPC Cmdlets and HTTP Services

We have reduced technical debt and greatly reduced the lines of code for the Universal module. All the cmdlets within the module (aside from PowerShell app commands) now use gRPC to communicate with the system. The module changes how it calls and authenticates based on the environment. This holds true for both external and integrated calls. While this change is mostly internal, it allows for a more consistent and secure communication channel between the Universal module and the Universal server. All calls use the same authentication and authorization mechanisms as the rest of the platform. It also takes advantage of the new permissions system to control access to the cmdlets.

In addition to changing all our cmdlets to use gRPC, we’ve also refactored our HTTP API services for the management API to use the exact same methods in our code base. Again, this greatly reduces the code-base and ensures we use the same authentication and authorization mechanisms as the rest of the platform. We still have some work in this area before v5. All APIs are now documented.

We’ll have a technical blog post on this change in the future but an example of the change is below.

Known Issues

There are a couple of known issues:

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 anticipate that the next few beta releases will happen with increasing frequency as we get closer to the final release. Check the download page for updates to v5 as they are available. Depending on the contents of the release, we may not do a blog post.