Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Exchange-Documentation-Script-Enhanced.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,8 @@ function Export-ToHTML {
var content = element.nextElementSibling;
content.classList.toggle('show');
element.textContent = content.classList.contains('show') ?
element.textContent.replace('', '') :
element.textContent.replace('', '');
element.textContent.replace('$([char]::ConvertFromUtf32(0x25B6))', '$([char]::ConvertFromUtf32(0x25BC))') :
element.textContent.replace('$([char]::ConvertFromUtf32(0x25BC))', '$([char]::ConvertFromUtf32(0x25B6))');
}
</script>
</head>
Expand All @@ -1012,15 +1012,15 @@ function Export-ToHTML {
$expiringSoonCerts = $Script:ReportData["ExchangeCertificates"] | Where-Object {$_.DaysUntilExpiry -le 30 -and $_.DaysUntilExpiry -gt 0}

if ($expiredCerts.Count -gt 0) {
$criticalAlerts += "⚠️ $($expiredCerts.Count) expired certificate(s) found"
$criticalAlerts += "$([char]::ConvertFromUtf32(0x26A0))$([char]::ConvertFromUtf32(0xFE0F)) $($expiredCerts.Count) expired certificate(s) found"
}
if ($expiringSoonCerts.Count -gt 0) {
$criticalAlerts += "⚠️ $($expiringSoonCerts.Count) certificate(s) expiring within 30 days"
$criticalAlerts += "$([char]::ConvertFromUtf32(0x26A0))$([char]::ConvertFromUtf32(0xFE0F)) $($expiringSoonCerts.Count) certificate(s) expiring within 30 days"
}
}

if ($criticalAlerts.Count -gt 0) {
$htmlContent += "<div class='critical-box'><h3>🚨 Critical Alerts</h3><ul>"
if ($criticalAlerts.Count -gt 0) {
$htmlContent += "<div class='critical-box'><h3>" + $([char]::ConvertFromUtf32(0x1F6A8)) + " Critical Alerts</h3><ul>"
foreach ($alert in $criticalAlerts) {
$htmlContent += "<li>$alert</li>"
}
Expand All @@ -1030,7 +1030,7 @@ function Export-ToHTML {
# Add summary statistics if available
$hasStats = $Script:ReportData.ContainsKey("MailboxStatistics") -or $Script:ReportData.ContainsKey("EXO_MailboxStatistics")
if ($hasStats) {
$htmlContent += "<h2>📊 Summary Statistics</h2><div class='summary-stats'>"
$htmlContent += "<h2>" + $([char]::ConvertFromUtf32(0x1F4CA)) + " Summary Statistics</h2><div class='summary-stats'>"

if ($Script:ReportData.ContainsKey("MailboxStatistics")) {
$stats = $Script:ReportData["MailboxStatistics"]
Expand Down Expand Up @@ -1084,7 +1084,7 @@ function Export-ToHTML {
$envBadge += "<span class='environment-badge badge-critical'>Critical</span>"
}

$htmlContent += "<button class='collapsible $envClass' onclick='toggleContent(this)'> $displayName $envBadge</button>"
$htmlContent += "<button class='collapsible $envClass' onclick='toggleContent(this)'>" + $([char]::ConvertFromUtf32(0x25B6)) + " $displayName $envBadge</button>"
$htmlContent += "<div class='content'>"

if ($data -and (($data -is [Array] -and $data.Count -gt 0) -or ($data -isnot [Array]))) {
Expand Down Expand Up @@ -1239,10 +1239,10 @@ function Start-ExchangeDocumentation {
$expiringSoonCerts = $Script:ReportData["ExchangeCertificates"] | Where-Object {$_.DaysUntilExpiry -le 30 -and $_.DaysUntilExpiry -gt 0}

if ($expiredCerts.Count -gt 0) {
Write-Host "⚠️ CRITICAL: $($expiredCerts.Count) expired certificate(s) found!" -ForegroundColor Red
Write-Host ("$([char]::ConvertFromUtf32(0x26A0))$([char]::ConvertFromUtf32(0xFE0F)) CRITICAL: $($expiredCerts.Count) expired certificate(s) found!") -ForegroundColor Red
}
if ($expiringSoonCerts.Count -gt 0) {
Write-Host "⚠️ WARNING: $($expiringSoonCerts.Count) certificate(s) expiring within 30 days!" -ForegroundColor Yellow
Write-Host ("$([char]::ConvertFromUtf32(0x26A0))$([char]::ConvertFromUtf32(0xFE0F)) WARNING: $($expiringSoonCerts.Count) certificate(s) expiring within 30 days!") -ForegroundColor Yellow
}
}

Expand Down