Microsoft just unveiled a new cross-platform, minimalist web framework for PowerShell Core 6 called Polaris. Microsoft Polaris is a simple code aimed at helping those who want to set up their own webservers within Polaris to accept requests and perform a variety of other functions.
In addition, Polaris is an open source experiment. The team is collecting feedback from users on how to proceed with the technology. There’s currently no plan to make it an officially supported Microsoft library.
Here’s more from Microsoft about the framework and what it hopes to accomplish through this open source experiment.
Benefits of Microsoft Polaris
The purpose of Polaris is rooted in the evolution of PowerShell. The team wanted to create a solution for those PowerShell users who want to run their own webservers and allow for a language-agnostic method for running PowerShell scripts thanks to HTTP. Since it’s an open source project, the team also hopes that Polaris helps users uncover even more use cases for PowerShell above and beyond what’s already been done.
Polaris consists of six lines of code. By using that code within PowerShell, you’ll have your very own webserver running and ready to accept requests. Microsoft has outlined a few different paths that the team is interested in taking with this new technology, including expanding the current implementation using HttpListener to deliver features you might expect from other projects such as ASP.NET or Express.js, investigating the potential use of Kestrel or ASP.NET Routing over HttpListener, support for Windows PowerShell 5.x and lower, and creating a routing domain-specific language for isolating and running script blocks as routes.
Are you interested in seeing what Polaris is all about and trying it out for yourself? You can access Polaris over on GitHub and share thoughts on the project with the Microsoft team.