param( [Parameter(Mandatory)][string]$JsonData, [Parameter(Mandatory)][string]$OutputPath ) # Escape for safe embedding in JS string literal $escaped = $JsonData -replace '\\', '\\\\' -replace "'", "\\\'" -replace "`r`n", '\n' -replace "`n", '\n' $html = @' Mail-Organizer Protokoll

Mail-Organizer Protokoll

'@ # Write without BOM $utf8NoBom = New-Object System.Text.UTF8Encoding $false [System.IO.File]::WriteAllText($OutputPath, $html, $utf8NoBom)