Loading…

Running Universal Dashboard in Azure and IIS

Universal Dashboard allows you to create beautiful web-based dashboards in PowerShell. In the latest release, these dashboards can now be hosted in Azure and IIS. The live preview is running in Azure as we speak.

Authoring a Dashboard that can run in Azure and IIS

Creating a hosted dashboard is easy. All you need to do when creating the PowerShell script to run in Azure is to use the -Wait parameter on Start-Dashboard. This blocks the PowerShell session and allows the dashboard to process requests coming into Azure or IIS.

Setting the port has no effect when hosted in Azure or IIS. Azure and IIS provides a dynamic port at runtime and the Universal Dashboard will listen on that port.

For an example of a dashboard that runs in Azure and IIS, visit GitHub.

Publishing to Azure or IIS

The Universal Dashboard module ships with two files that are necessary for Azure or IIS hosting. The first is a web.config file found in the root of the installation directory. The web.config file specifies which exectuable to run when hosted in IIS.

The second file is UniversalDashboard.exe which bootstraps PowerShell and launches the dashboard.

You’ll also need to install the ASP.NET Core Module for IIS for hosting to work when on-premises. When hosting in Azure, this module is already installed.

Once you’ve created your Azure WebApp or IIS Website, you’ll need to deploy the Universal Dashboard files.

When deploying the files, you’ll need to include the Universal Dashboard module. Simply copy the contents to Azure via FTP or the IIS file system. In the root directory, include the dashboard that you would like to run. Name the file dashboard.ps1. When the WebApp starts it will start UniversalDashboard.exe and in turn launch your dashboard.

The resulting file structure needs to look like this.

You should now be up and running with Universal Dashboard in the cloud.

 

Leave a Reply