Building PowerShell Tools for MSPs – PowerShell Universal Dashboard

Save to My DOJO

Building PowerShell Tools for MSPs – PowerShell Universal Dashboard

Table of contents

This is a great time to be in IT! With the rate of emerging projects on GitHub, we are starting to see an explosion of projects and a mass collaboration with the community. As an MSP that uses PowerShell to automate their processes, one of the emerging projects worth taking a look at is the PowerShell Universal Dashboard. This is essentially a collection of modules that allows one to create Web GUI Dashboards within a matter of minutes. This is an extremely useful tool and can be heavily utilized with your organizations’ 3rd party application APIs to create a unified tool for your MSP.

In this Article

  1. How to Install the PowerShell Universal Dashboard
  2. Getting Started with the PowerShell Universal Dashboard
  3. Going Further with the PowerShell Universal Dashboard

How to install the PowerShell Universal Dashboard

We need to update PowerShellGet to version 1.6 before we can download and install the Universal Dashboard.To check the verison installed on your server/workstation type:

gcm -module powershellget

If the version listed there is not 1.6 then open up an administrative PowerShell console and type in the following to upgrade:

install-module powershellget -Force

When we run the command again we can see that the module is now upgraded to 1.6:

There are now two editions of the Universal Dashboard. The edition that costs money to run is the ” Enterprise Edition”, which must be licensed or it will only run for 1 hour. To install open up an administrative PowerShell and type in the following command to install the module:

Install-Module -Name UniversalDashboard -RequiredVersion 1.7.0

The 2nd edition available is the Community Edition. This version is free, however there are some features that are not available in this version such as branding of the dashboard and Rest API authentication. To install this version open up an administrative PowerShell console and type in the following:

Install-Module UniversalDashboard.Community -AllowPrerelease

Note: you must have .Net Framework 4.5 installed in order to use PowerShell Get and Run the Universal Dashboard. If you don’t have it installed, get it here.

Getting Started with the PowerShell Universal Dashboard

Once you have the modules installed, you can easily jump into developing your own Dashboard website. The beauty of the Universal Dashboard is that it is built on .net core which means that our dashboards that we create can be run virtual ANYWHERE. We can run them as a container, IIS, as a service on windows, and even right from the command line if we wanted to. To get started, lets create a simple dashboard by typing in the following syntax:

$homepage = New-UDPage -name Homepage -Content {
     New-UDCard -Title "This is our Test Card"-Text "I just created this card with the new-udcard cmdlet"
}
$testDashboard = New-UDDashboard -Title "This is our awesome dashboard" -page $homepage

What we did was create a homepage using the New-UDPage cmdlet, we named it Homepage and used the -content parameter to put content into the page itself. In the -Content scriptblock we have the New-UDCard parameter which allows us to create a card on the page and input text into that card.

Next we need to create a dashboard using the New-UDDashboard cmdlet. We use -Title to give our dashboard a title at the top and then specify which pages we want the dashboard to include with the -page parameter and specify our $homepage variable that we saved our homepage as.

Now that we have our dashboard created with pages specified. Next we need to “start” our dashboard. We can do this by adding the Start-UDDashboard cmdlet to the end of our script and specify the $testDashboard dashboard that we created above. I’m also specifying below that port 1000 is used to access this dashboard, which you will see how that works in our next steps below.:

Start-UDDashboard -Dashboard $testDashboard -port 1000

Now we can run our entire script either in ISE, PS console, or in my case Visual Studio Code. Then to see the results our our code, we can open up a browser and go to http://localhost:1000. Now we can see the dashboard that we just created:

So in as little as 5 minutes we already have a web hosted GUI running. To stop running this dashboard, we can type in the following command:

get-uddashboard | stop-uddashboard

Going Further With the PowerShell Universal Dashboard

This is just a very basic tutorial on the PowerShell Universal Dashboard intended to show the concept of how it works and demonstrate how quickly you can get a dashboard-styled web site up and running.  All we did was make one page that has a card full of text. There are many more cmdlets and features that we can include on our dashboard pages. Check out this site to get an idea, its incredible.

The possibilities are limitless with this new framework for quickly creating web GUIs with PowerShell. We could create charts to monitor a specific application or server, or we could even add in authentication to provide privileged access to our dashboards. We can also use the Web UI as a front end to run complex PowerShell scripts. Additionally, now that the PowerShell Universal Dashboard now has a community edition, we are going to start to see some really cool projects emerge. With PowerShell and application API’s this tool can be used to create monitoring dashboards of almost anything imaginable. I believe we are just barely scratching the surface with this module. Let me know in the comments below on what you think!

This post is part of a series about PowerShell tools for MSPs. Why not have a look at the other entries in the series?

Building PowerShell Tools for MSPs: Automating Windows Updates

Building PowerShell Tools for MSPs: HTML Tables for Reporting

Building PowerShell Tools for MSPs: Using SFTP

Building PowerShell Tools for MSPs: Working with REST APIs

Building PowerShell Tools for MSPs: Advanced Functions

 

Altaro O365 Backup for MSPs
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

2 thoughts on "Building PowerShell Tools for MSPs – PowerShell Universal Dashboard"

  • liupe says:

    HI man ,

    Why when i run the “New-UDDashboard -Title “This is our awesome dashboard” -page $homepage -port 1000 ”
    then the error message reported , A parameter cannot be found that matches parameter name ‘port’.

    i am install -module 2.1.0 version

    • Hi Liupe, Thanks for the comment. The parameter -port should be specified when starting up the dashboard using Start-UDDashboard. The syntax has been updated on this post. Thanks!

Leave a comment

Your email address will not be published.

6 Must-Have Microsoft 365 Security Configurations Every Admin Needs to Know