From 26b1d0d79788ee0b3078c2c700d9325bfdec4041 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Fri, 4 Sep 2026 13:46:42 +0200 Subject: [PATCH] Sectionning --- WindowsMaintenanceReport.ps1 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/WindowsMaintenanceReport.ps1 b/WindowsMaintenanceReport.ps1 index 6112bcd..47f634a 100644 --- a/WindowsMaintenanceReport.ps1 +++ b/WindowsMaintenanceReport.ps1 @@ -106,12 +106,8 @@ function Write-Section { [scriptblock]$Script ) - $separator = '=' * 80 - Write-Both $Writer '' - Write-Both $Writer $separator - Write-Both $Writer $Title - Write-Both $Writer $separator + Write-Both $Writer ('--- ' + $Title + ' ---') try { $result = & $Script 2>&1 @@ -246,7 +242,8 @@ $computerName = $env:COMPUTERNAME $reportName = 'windows_system_report_' + $computerName + '_' + $timestamp + '.txt' $reportPath = Join-Path $OutputDirectory $reportName -$encoding = $encoding = [System.Text.Encoding]::ASCII +# $encoding = $encoding = [System.Text.Encoding]::ASCII +$encoding = New-Object System.Text.UTF8Encoding($false) $writer = New-Object System.IO.StreamWriter($reportPath, $false, $encoding) try {