Dashboard Server: Working with the PowerShell tile

Sameer Mhaisekar

SquaredUp, Technical Evangelist

Amongst all the cool features of SquaredUp Dashboard Server, the coolest kid on the block is probably the PowerShell tile. The reason is simple – PowerShell is easy, it’s awesome, and it’s powerful!

You can not only retrieve data from the source (like the APIs), but you can also manipulate that data, work with variables, loop it, filter it, and use it in whichever way works the best. Like they say, the things PowerShell can do are only restricted by the proficiency of the user.

Not a lot of dashboarding tools out there give you this power to visualize PowerShell scripts. And it’s not usually free too! That’s why I was excited to see this in Dashboard Server. Let’s dive in!

Explore the PowerShell visualization wizards

Since this is a brand-new tile, this is the first time I’m using this as well. Let’s check out what the wizards are and some of the sample dashboards in here to see how exactly this works.

Some nice visualization formats! I like that. Let’s choose Scalar for now.

Seems pretty straightforward, actually. From a quick read through the documentation, it looks like the “profile” section is where you can store a reusable portion of the script that you can select from a drop-down later. This can include any sensitive information like the username-password, authentication tokens, etc. This will be encrypted and visible only to the Dashboard Server administrators.

And then you have the space to enter the actual script:

Alright – seems easy enough. Let’s check some examples quickly.

Here’s the Share Price Tracker line graph dashboard under Sales & Business dashboard.

Looks like the tile is using the default “squaredup app pool identity” profile and the script itself is actually calling an API that we use internally and outputting it as a series of values with timestamps on them. If I run this script outside of Dashboard Server, this is the response I see:

This response is ideal for a line graph! This is what I was referring to when I said you can manipulate the data you get instead of relying on the source to provide you the data in the format you want.

Alright, I think I’ve got the hang of this now. Let’s try to create our own little dashboard!

Let’s create a dashboard

I’ll start with a simple one. I have a SCOM environment, and I want to see how many active critical alerts I have in there currently. A very simple, couple of lines of code.

…and BAM, there you go!

Now, let’s leverage the same concept and list the first 15 of those alerts using a Grid tile.

Another quick change you may notice here is that I’ve shifted the code for connecting to my SCOM environment to a profile called scom mg connection, so I don’t have to expose it in all the scripts I’m writing.

You’ll also notice that you can choose to hide or show the columns in the output. And just like that, we have a list of alerts currently active in SCOM.

With that, let’s end this here. As you can imagine we’ve just scratched the surface of what is possible with the PowerShell tile. In the subsequent blogs to follow, we will cover some more detailed use cases and more complex PowerShell scripts, so hang tight!

Until then, happy dashboarding!

Sameer Mhaisekar

SquaredUp, Technical Evangelist