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

Show parent comments

1

u/owndy Apr 02 '19

Any hints, how can i use gmail with PsWinReporting ? Does PSWinReporting have some switches?

2

u/MadBoyEvo Apr 02 '19

What do you mean using PSWinReporting with Gmail? PSWinReporting has lots of switches ;)

If you mean sending what PSWinReporting does to Email, Teams, Slack, Sql or Dicord than yes.

https://evotec.xyz/hub/scripts/pswinreporting-powershell-module/ - start here and in the middle of the page there is Related Articles section which has lots of things described how it works and how to set it up.

If it's something else please describe ;)

2

u/owndy Apr 03 '19

Sorry about that shitty explanation. Script works great, it does make HTML, but i couldn't figure out how to set up to send e-mail through gmail .

I did setup like this, but it does not send e-mail. I think something is wrong with my parameters, but i couldn't figure out :( .

$EmailParameters = @{

EmailFrom = "<myemail>@gmail.com"

EmailTo = "<myemail>@gmail.com"

EmailServer = " smtp.gmail.com "

EmailServerPassword = "<mypasswordisdefined>"

EmailServerPasswordAsSecure = $false

EmailServerPasswordFromFile = $false

EmailServerPort = "587"

EmailServerLogin = "<myemail>@gmail.com

EmailServerEnableSSL = 1

EmailEncoding = "Unicode"

EmailSubject = "[Reporting] Event Changes for period <<DateFrom>> to <<DateTo>>"

EmailPriority = "Low" # Normal, High

2

u/MadBoyEvo Apr 03 '19

I believe gmail requires special password for smtp. You may need to check that.