r/PowerShell • • Apr 02 '19

Dashimo - PowerShell Generated HTML Dashboard in a single file

Something that may come useful to you guys. Recently I've written Dashimo which allows creating HTML dashboards in a very easy, intuitive way. With it, you no longer have to build an object and then play with HTML to get it to display correctly in HTML.

The whole idea with screenshots is described in my blog.

https://evotec.xyz/meet-dashimo-powershell-generated-dashboard/

Dashimo generates a single HTML file that you can attach to email or host on a website. There is no DB or anything else. Keep in mind this can't be used as Email Content because it holds JS and heavy CSS. But you can attach it to email and the features it holds within that HTML are well worth it.

On my blog, I'm explicitly showing it using my Active Directory module but you can pass anything to Table. Even $Object = Get-Process if you really want to.

Dashboard -Name 'Dashimo Test' -FilePath $PSScriptRoot\Dashboard.html {
    Tab -Name 'Forest' {
        Section -Name 'Forest Information' -Invisible {
            Section -Name 'Forest Information' {
                Table -HideFooter -DataTable $DataSetForest.ForestInformation
            }
            Section -Name 'FSMO Roles' {
                Table -HideFooter -DataTable $DataSetForest.ForestFSMO
            }
        }
   }
} 

The easiest sample looks like this.

$Process = Get-Process | Select-Object -First 30

Dashboard -Name 'Dashimo Test' -FilePath $PSScriptRoot\Dashboard1.html {
    Section -Name 'Test' {
        Table -DataTable $Process
    }
}

You can have as many sections/panels as you need. Tabs also work just fine. Charts are coming sometime soon.

130 Upvotes

90 comments sorted by

View all comments

2

u/Andy_C33 Apr 04 '19

Hi,
I'm kinda new to PS so i'm possible missing something really simple here but i get this error
"Find-Events : The term 'Find-Events' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,

verify that the path is correct and try again."

any suggestions?

Everything else runs just fine and its great :-)

2

u/MadBoyEvo Apr 04 '19

Find-Events is part of PSWinReporting Module

Overview: https://evotec.xyz/hub/scripts/pswinreporting-powershell-module/

Last post: https://evotec.xyz/pswinreporting-1-8-split-of-branches-legacy-vs-new-hope/

Install-Module PSWinReporting -AllowPrerelease -Force

It's in preview thou (hence why you need AllowPrerelease) so there's no documentation for it at all. 2.0 is completly rewritten PSWinReporting. You don't need Find-Events for Dashimo. That was just an example, unless you want it's features...

2

u/Andy_C33 Apr 04 '19

hi,
Thank you for replying, the module installs fine (although the -allowprerelease switch is invalid)
but I still get that find-events error when running the entire script (the modules appear to import ok, IE: no errors)
I'm probably missing something really silly here... sorry for my dumbness :-)