PowerShell Universal Visual Studio Code Extension
September 3, 2020
Today, I’m happy to announce the release of the first version of the PowerShell Universal Visual Studio Code Extension! This extension provides some features to make it easier to get up and running with Universal and initially aids in authoring dashboards.
The PowerShell Universal extension comes with a tree view provider and is added to the activity bar.
When you click on the PowerShell Universal icon, the extension will activate. During the first activation, the extension will prompt to download Powershell Universal.
Once downloaded, the extension will extract the server to
%AppData%\PowerShellUniversal. Then it will start the server as a terminal window so that you can view logging output.
After starting the server, the extension will login with the default credentials and grant an app token. The app token is then stored in your user settings. The next time you start VS Code, it won’t have to download Universal again and will just start the server and connect with the stored app token.
Working with Dashboards
The target for this first release is to make it easier to work with dashboards. Within the PowerShell Universal pane, you will have a Dashboards tree view. Your dashboards will be listed here. Their current state, dashboard framework and name will be listed.
You have options to import the dashboard modules, open the dashboard file, restart the dashboard and view the dashboard in a browser.
When you open the dashboard’s PS1 file, the extension will automatically import the Universal, UniversalDashboard and any component modules into your current PowerShell session so that IntelliSense works properly.
When making changes to dashboards, the Universal server should automatically restart the dashboard process so that changes are reflected. If you’d like to manually restart the process, you can click the restart button next to the dashboard’s name. A notification will be shown that provides the process ID of the dashboard.
Contributing and Roadmap
You are welcome to contribute to the PowerShell Universal VS Code Extension. The code is up on GitHub with an MIT License. We plan to add features to this to address issues that folks have when developing for Universal.
Some of the things we see in the future are:
- Customizing Repository path settings
- Workspace based settings to allow for multiple Universal projects
- Debugging support for Dashboard endpoints
- API Support
- Automation Support
If you have any feature requests or issues, please report them on GitHub.