Curated Examples
Build a local dashboard
Create a dashboard index over local report folders.
This pattern is useful when generated reports already exist under a local Reports folder and you want a browsable entry point.
It is adapted from Examples/TheDashboardMinimal.ps1.
Example
Import-Module TheDashboard
$reportsRoot = Join-Path $PSScriptRoot 'Reports'
$dashboardPath = Join-Path $reportsRoot 'Index.html'
$statisticsPath = Join-Path $PSScriptRoot 'Dashboard.xml'
Start-TheDashboard -HTMLPath $dashboardPath -StatisticsPath $statisticsPath -ShowHTML {
$today = Get-Date
New-DashboardGage -Label 'Reports' -MinValue 0 -MaxValue 100 -Value 12 -Date $today
New-DashboardGage -Label 'Warnings' -MinValue 0 -MaxValue 100 -Value 3 -Date $today
New-DashboardFolder -Name 'Active Directory' -IconBrands windows -UrlName 'ActiveDirectory' -Path (Join-Path $reportsRoot 'ActiveDirectory')
New-DashboardFolder -Name 'Group Policy' -IconBrands microsoft -UrlName 'GroupPolicy' -Path (Join-Path $reportsRoot 'GroupPolicy')
New-DashboardReplacement -SplitOn '_' -AddSpaceToName
New-DashboardReplacement -AfterSplit @{
'G P O' = 'GPO'
'L D A P' = 'LDAP'
'D C' = 'DC'
}
New-DashboardLimit -LimitItem 1 -IncludeHistory
}
The gage values above are placeholders. In a production dashboard, replace them with counts from your own report generation pipeline.
What this demonstrates
- building a static dashboard page
- grouping report folders behind friendly labels
- cleaning generated report names without exposing environment-specific paths