From 5b5065e9a6cff386d32b1a3a99d20ae04b4c23fa Mon Sep 17 00:00:00 2001 From: David Paulson Date: Tue, 30 Jan 2024 15:18:26 -0600 Subject: [PATCH] HTML Report with date and provide location of output --- Diagnostics/HealthChecker/Features/Get-HtmlServerReport.ps1 | 2 ++ Diagnostics/HealthChecker/HealthChecker.ps1 | 2 +- docs/Diagnostics/HealthChecker/index.md | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Diagnostics/HealthChecker/Features/Get-HtmlServerReport.ps1 b/Diagnostics/HealthChecker/Features/Get-HtmlServerReport.ps1 index a07b4b7052..65dc7cb523 100644 --- a/Diagnostics/HealthChecker/Features/Get-HtmlServerReport.ps1 +++ b/Diagnostics/HealthChecker/Features/Get-HtmlServerReport.ps1 @@ -100,4 +100,6 @@ function Get-HtmlServerReport { $htmlReport = $htmlHeader + $htmlOverviewTable + $htmlServerDetails + "$([System.Environment]::NewLine)" $htmlReport | Out-File $HtmlOutFilePath -Encoding UTF8 + + Write-Host "HTML Report Location: $HtmlOutFilePath" } diff --git a/Diagnostics/HealthChecker/HealthChecker.ps1 b/Diagnostics/HealthChecker/HealthChecker.ps1 index e6018399b5..bef960c863 100644 --- a/Diagnostics/HealthChecker/HealthChecker.ps1 +++ b/Diagnostics/HealthChecker/HealthChecker.ps1 @@ -124,7 +124,7 @@ param( [switch]$BuildHtmlServersReport, [Parameter(Mandatory = $false, ParameterSetName = "HTMLReport", HelpMessage = "Provide the name of the Report to be created.")] - [string]$HtmlReportFile = "ExchangeAllServersReport.html", + [string]$HtmlReportFile = "ExchangeAllServersReport-$((Get-Date).ToString("yyyyMMddHHmmss")).html", [Parameter(Mandatory = $true, ParameterSetName = "DCCoreReport", HelpMessage = "Enable the DCCoreReport feature data collection against the current server's AD Site.")] [switch]$DCCoreRatio, diff --git a/docs/Diagnostics/HealthChecker/index.md b/docs/Diagnostics/HealthChecker/index.md index 7c2ba2a961..6a02ee8c99 100644 --- a/docs/Diagnostics/HealthChecker/index.md +++ b/docs/Diagnostics/HealthChecker/index.md @@ -152,7 +152,7 @@ ServerList | Used in combination with the LoadBalancingReport switch for letting SiteName | Used in combination with the LoadBalancingReport switch for letting the script to know which servers to run against in the site. XMLDirectoryPath | Used in combination with BuildHtmlServersReport switch for the location of the HealthChecker XML files for servers which you want to be included in the report. Default location is the current directory. BuildHtmlServersReport | Switch to enable the script to build the HTML report for all the servers XML results in the XMLDirectoryPath location. -HtmlReportFile | Name of the HTML output file from the BuildHtmlServersReport. Default is ExchangeAllServersReport.html +HtmlReportFile | Name of the HTML output file from the BuildHtmlServersReport. Default is ExchangeAllServersReport-yyyyMMddHHmmss.html DCCoreRatio | Gathers the Exchange to DC/GC Core ratio and displays the results in the current site that the script is running in. AnalyzeDataOnly | Switch to analyze the existing HealthChecker XML files. The results are displayed on the screen and an HTML report is generated. VulnerabilityReport | Switch to collect the Vulnerability Information for all the servers in the environment and export it out to json file.