A Dashboard to help my help desk gather and triage

I wrote this for our front line folks to be able to quickly lookup account info (AD), generate support session links (Bomgar API), send critical alerts (KACE API, PRTG API and GroupMe API), and more.

I can’t share the whole code but anyone wondering how something was done, let me know, and i can sanitize snippets.

The KACE API Module, I also wrote, and is open-source, available on the PSGallery

It’s AzureAD authenticated single-sign-on, and is running in IIS.

I can only post a single image (new user), so here’s a simple AD query:

5 Likes

Easy question: how did you change the title at the top from ‘PowerShell Universal Dashboard’ and lose the footer?

Thee footer removal is an enterprise license feature, i don’t believe it’s doable with the community edition. You specify in New-UDDashboard:

-Footer (New-UDFooter -Links (New-UDLink -Text ''Footer Text" -Url 'https://www.google.com'))

To change it from ‘Created with UniversalDashboard’.

I’m not sure what top part you are referring to, do you have an example?

1 Like

Thanks for the quick reply. I was able to figure out the title part at the top by revisiting the New-UDDashboard parameters. I had previously tried to add a -Title to my dashboard and all of the sudden the login page would stop loading and go right to the dashboard. I tried again just now and it’s working, so it must have been a typo in my script.

I do have Enterprise and I was able to change the text thanks to your tip.

1 Like

@artvandelay440 How did you get that to pop up on your page?

New-UDButton -Text “Button 1…” -OnClick {
Show-UDModal -Header {
New-UDHeading -Size 4 -Text “Hey azurefanboy”
} -Content {
New-UDCard -Title “Card in a box!” -Content {
}
}

What version of UD are you using? @PorreKaj

The feature was introduced in 2.0 if I remember correctly.

The code above was from 2.1

@PorreKaj I am using 2.2 and button does nothing.

I even used the snippet from the Get-Help example:

New-UDButton -Text "Create Member"  -OnClick {
                Show-UDModal -Header {
                    New-UDHeading -Size 4 -Text "Modal"
                } -Context {
                    "This is a modal"
                }
            }

How are you running your dashboard? Do buttons usually work?

@PorreKaj Yes. I just replaced the action of another button I already had in place.

If you bring up developer tools in your browser. Does it log anything when you hit the button?

image @PorreKaj

Maybe you ought to make a topic on the help section. It’s a bit out of my league.

Better chance of Adam seeing it there :slight_smile:

1 Like

The missing fonts dont effect your modal , if you can share a sample of you dashboard code, we can take a look.

I tried to keep is simple to make sure this was working, but no luck.

New-UDPage -Name “Test” -Icon male -Content {

New-UDButton -Text “Test” -OnClick {
Show-UDModal -Header {
New-UDHeading -Size 4 -Text “Modal”
} -Context {
“This is a modal”
}

}

}

@azurefanboy

you used -Context. the parameter is -Content.

I like how your cards look (image sizing, links). Could you share a snip?

Sure, here’s the top left with the 4 links

$CardSplat = @{
                BackgroundColor = "#eeeeee"
                Image           = (New-UDImage -Url (Get-ImageBase64Uri -Path '.\assets\image01.svg'))
            }
            New-UDCard @CardSplat -Endpoint {
                New-UDButton -Flat -Text "Website 1" -IconAlignment left -Icon dot_circle_o -OnClick {
                    Invoke-UDRedirect -Url 'https://website01'
                }
                New-UDButton -Flat -Text "Website 2" -IconAlignment left -Icon dot_circle_o -OnClick {
                    Invoke-UDRedirect -Url 'https://website02'
                }
                New-UDButton -Flat -Text "Website 3" -IconAlignment left -Icon dot_circle_o -OnClick {
                    Invoke-UDRedirect -Url 'https://website03'
                }
                New-UDButton -Flat -Text "Website 4" -IconAlignment left -Icon dot_circle_o -OnClick {
                    Invoke-UDRedirect -Url 'https://website04'
                }
                
            }

For that exact code, you’ll need a helper function that converts the .svg image to base64 (Get-ImageBase64Uri)

Function Get-ImageBase64Uri {
    param(
        [Parameter(Mandatory=$True)]
        [string]
        $Path
    )
    "data:image/svg+xml;base64," + [convert]::ToBase64String((get-content $Path -encoding byte))
}
1 Like

Thank you. My dashboard is looking better now :slight_smile: