Loading repository data…
Loading repository data…
EvotecIT / repository
TheDashboard is a PowerShell module that generates nice HTML dashboard that's main goal is to integrate multiple reports created by other PowerShell modules. It's main goal is to provide a single place to see all the information you need. It's not meant to be a replacement for other modules.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
TheDashboard is a PowerShell module that generates nice HTML dashboard that's main goal is to integrate multiple reports created by other PowerShell modules. It's main goal is to provide a single place to see all the information you need. It's not meant to be a replacement for other modules, but rather a way to integrate them into a single place.
A lot of modules that I've created over the years such as Tesimo, ADEssentials, GPOZaurr, or other external products such as PingCastle generate HTML output. While using those modules is great, it's not always easy to see all the information in one place. TheDashboard solves this problem.
The main feature of TheDashboard is to generate HTML report that can be used to see all the information in one place. While doing so, TheDashboard provides additional insights so that the picture of infrastructure is more complete.
Gages with quick overview:
Panels available for quick overview
Following example shows how to generate a dashboard
Start-TheDashboard -HTMLPath "$PSScriptRoot\Reports\Index.html" -Logo 'https://evotec.xyz/wp-content/uploads/2021/04/Logo-evotec-bb.png' -ShowHTML {
# Gather data for gages
$Today = Get-Date
$Forest = Get-ADForest
$AllUsers = $Forest.Domains | ForEach-Object { Get-ADUser -Filter * -Properties 'DistinguishedName' -Server $_ }
$AllComputers = $Forest.Domains | ForEach-Object { Get-ADComputer -Filter * -Properties 'DistinguishedName' -Server $_ }
$AllGroups = $Forest.Domains | ForEach-Object { Get-ADGroup -Filter * -Server $_ }
$AllGroupPolicies = $Forest.Domains | ForEach-Object { Get-GPO -All -Domain $_ }
# Top level gages
New-DashboardGage -Label 'Users' -MinValue 0 -MaxValue 500 -Value $AllUsers.Count -Date $Today
New-DashboardGage -Label 'Computers' -MinValue 0 -MaxValue 200 -Value $AllComputers.Count -Date $Today
New-DashboardGage -Label 'Groups' -MinValue 0 -MaxValue 200 -Value $AllGroups.Count -Date $Today
New-DashboardGage -Label 'Group Policies' -MinValue 0 -MaxValue 200 -Value $AllGroupPolicies.Count -Date $Today
# Folder definitions
New-DashboardFolder -Name 'ActiveDirectory' -IconBrands gofore -UrlName 'ActiveDirectory' -Path $PSScriptRoot\Reports\ActiveDirectory
New-DashboardFolder -Name 'GroupPolicies' -IconBrands android -UrlName 'GPO' -Path $PSScriptRoot\Reports\GroupPolicies
New-DashboardFolder -Name 'DomainControllers' -IconBrands android -UrlName 'DomainControllers' -Path $PSScriptRoot\Reports\DomainControllers
# Global Replacements
New-DashboardReplacement -SplitOn "_" -AddSpaceToName
New-DashboardReplacement -BeforeSplit @{
'GPOZaurr' = ''
'PingCastle-' = ''
'Testimo' = ''
'GroupMembership-' = ''
'_Regional' = ' Regional'
}
New-DashboardReplacement -AfterSplit @{
'G P O' = 'GPO'
'L A P S' = 'LAPS'
'L D A P' = 'LDAP'
'K R B G T' = 'KRBGT'
'I N S' = 'INS'
'I T R X X' = 'ITRXX'
'A D' = 'AD'
'D H C P' = 'DHCP'
'D F S' = 'DFS'
'D C' = 'DC'
}
New-DashboardLimit -LimitItem 1 -IncludeHistory
} -StatisticsPath "$PSScriptRoot\Dashboard.xml" -Verbose -Online
Following example shows how to generate a dashboard
Start-TheDashboard -HTMLPath "$PSScriptRoot\Reports\Index.html" -Logo 'https://evotec.xyz/wp-content/uploads/2021/04/Logo-evotec-bb.png' -ShowHTML {
$Today = Get-Date
$Forest = Get-ADForest
$AllUsers = $Forest.Domains | ForEach-Object { Get-ADUser -Filter * -Properties 'DistinguishedName' -Server $_ }
$AllComputers = $Forest.Domains | ForEach-Object { Get-ADComputer -Filter * -Properties 'DistinguishedName' -Server $_ }
$AllGroups = $Forest.Domains | ForEach-Object { Get-ADGroup -Filter * -Server $_ }
$AllGroupPolicies = $Forest.Domains | ForEach-Object { Get-GPO -All -Domain $_ }
New-DashboardGage -Label 'Users' -MinValue 0 -MaxValue 500 -Value $AllUsers.Count -Date $Today
New-DashboardGage -Label 'Computers' -MinValue 0 -MaxValue 200 -Value $AllComputers.Count -Date $Today
New-DashboardGage -Label 'Groups' -MinValue 0 -MaxValue 200 -Value $AllGroups.Count -Date $Today
New-DashboardGage -Label 'Group Policies' -MinValue 0 -MaxValue 200 -Value $AllGroupPolicies.Count -Date $Today
New-DashboardFolder -Name 'ADEssentials' -IconBrands gofore -UrlName 'ADEssentials' -Path $PSScriptRoot\Reports\ADEssentials {
New-DashboardReplacement -SplitOn "_" -AddSpaceToName
New-DashboardReplacement -BeforeSplit @{
'GPOZaurr' = ''
'PingCastle-' = ''
'Testimo' = ''
'GroupMembership-' = ''
'_Regional' = ' Regional'
}
New-DashboardReplacement -AfterSplit @{
'G P O' = 'GPO'
'L A P S' = 'LAPS'
'L D A P' = 'LDAP'
'K R B G T' = 'KRBGT'
'I N S' = 'INS'
'I T R X X' = 'ITRXX'
'A D' = 'AD'
}
} -DisableGlobalReplacement
New-DashboardFolder -Name 'GPOZaurr' -IconBrands gofore -UrlName 'GPOzaurr' -Path $PSScriptRoot\Reports\GPOZaurr
New-DashboardReplacement -SplitOn "_" -AddSpaceToName
New-DashboardReplacement -BeforeSplit @{ 'GPOZaurr' = '' }
New-DashboardReplacement -BeforeSplit @{ 'GroupMembership-' = ''; '_Regional' = ' Regional' }
New-DashboardReplacement -BeforeSplit @{
'GPOZaurr' = ''
'PingCastle-' = ''
'Testimo' = ''
}
New-DashboardReplacement -AfterSplit @{ 'G P O' = 'GPO' }, @{ 'L D A P' = 'LDAP' }
New-DashboardReplacement -AfterSplit @{ 'L A P S' = 'LAPS' }, @{ 'K R B G T' = 'KRBGT' }
New-DashboardReplacement -AfterSplit @{ 'A D' = 'AD' }, @{ 'I T R X X' = 'ITRXX' }, @{ 'I N S' = 'INS' }
} -StatisticsPath "$PSScriptRoot\Dashboard.xml" -Verbose -Online -Force
Generated HTML Dashboard
TheDashboard can be used on any type of server as it generates static files that can be served by any web server. It can run on IIS, Apache, Nginx, or any other web server. However, IIS is the most common one and it's the one I'm going to use in this example. IIS is also the one that I'm most familiar with.
Install all required roles (may be too much, but it works). If you think some roles are not needed, feel free to remove them (open PR/Issue).
$Roles = @(
'Web-Server'
'Web-WebServer'
'Web-Common-Http'
'Web-Default-Doc'
'Web-Dir-Browsing'
'Web-Http-Errors'
'Web-Static-Content'
'Web-Http-Redirect'
'Web-DAV-Publishing'
'Web-Health'
'Web-Http-Logging'
'Web-Performance'
'Web-Stat-Compression'
'Web-Security'
'Web-Filtering'
'Web-IP-Security'
'Web-Url-Auth'
'Web-Windows-Auth'
'Web-App-Dev'
'Web-Net-Ext45'
'Web-Asp-Net45'
'Web-CGI'
'Web-ISAPI-Ext'
'Web-ISAPI-Filter'
'Web-WebSockets'
'Web-Mgmt-Tools'
'Web-Mgmt-Console'
)
Install-WindowsFeature -Name $Roles
Once IIS is installed we need to make sure data is a little bit protected. Enable windows authentication and disable anonymous authentication
Write-Host Disable anonymous authentication
Set-WebConfigurationProperty -Filter '/system.webServer/security/authentication/anonymousAuthentication' -Name 'enabled' -Value 'false' -PSPath 'IIS:\Sites\Default Web Site'
Write-Host Enable windows authentication
Set-WebConfigurationProperty -Filter '/system.webServer/security/authentication/windowsAuthentication' -Name 'enabled' -Value 'true' -PSPath 'IIS:\Sites\Default Web Site'
By default HTTP is enabled and it's not a good idea to have it enabled. We need to force redirect to HTTPS. To do that we need to install URL Rewrite module and configure it.
You can download URL Rewrite from https://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads
TheDashboard can be hosted on SharePoint Online. It's a little bit more tricky than hosting it on IIS, but it's doable. First of all SharePoint doesn't hosts HTML files directly. It hosts ASPX files. So we need to convert all HTML files to ASPX files. Secondly, SharePoint doesn't like "<%" in the content. It tries to interpret it as a server block. This is a problem because some of the reports generated by PowerShell modules contain "<%" in the content.
TheDashboard module provides three repair commands to help fix common issues with dashboard files:
| Command | Purpose | Common Use Case |
|---|---|---|
Repair-DashboardExtension | Convert file extensions | Converting .html to .aspx for SharePoint hosting |
Repair-DashboardContent | Fix content compatibility issues | Remove SharePoint-incompatible characters like <% |
Repair-DashboardEncoding | Fix encoding issues | Convert UTF-8 with BOM to UTF-8 without BOM for emoji support |
All commands support -WhatIf to preview changes before applying them.
Use this command to convert between .html and .aspx files, which is essential for SharePoint hosting.
# Convert HTML files to ASPX for SharePoint
Repair-DashboardExtension -Path "C:\Reports" -ExtensionFrom ".html" -ExtensionTo ".aspx"
# Convert back from ASPX to HTML if needed
Repair-DashboardExtension -Path "C:\Reports" -ExtensionFrom ".aspx" -ExtensionTo ".html"
# Preview changes with Wha