From 43ab3e1178fc16b9c5c4345e0299bc703912b01a Mon Sep 17 00:00:00 2001 From: diecknet <54552094+diecknet@users.noreply.github.com> Date: Thu, 30 Oct 2025 18:44:13 +0100 Subject: [PATCH] Fix Emoji problems with Windows PowerShell --- Exchange-Documentation-Script-Enhanced.ps1 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Exchange-Documentation-Script-Enhanced.ps1 b/Exchange-Documentation-Script-Enhanced.ps1 index d112400..0c2ff81 100644 --- a/Exchange-Documentation-Script-Enhanced.ps1 +++ b/Exchange-Documentation-Script-Enhanced.ps1 @@ -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))'); } @@ -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 += "