From dd0bc263e0e8ab4446e57cf36ff92fe1dcb04aca Mon Sep 17 00:00:00 2001 From: Meleki Date: Fri, 13 Mar 2026 15:39:31 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20Remote=20Command=20Tool=20-=20EncodedCom?= =?UTF-8?q?mand=20statt=20-Command=20f=C3=BCr=20korrekte=20Anf=C3=BChrungs?= =?UTF-8?q?zeichen-Behandlung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/remote.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wwwroot/remote.ps1 b/wwwroot/remote.ps1 index bc8084d..173a4b1 100644 --- a/wwwroot/remote.ps1 +++ b/wwwroot/remote.ps1 @@ -117,7 +117,9 @@ try { $stderr = "" try { - $output = & powershell.exe -NoProfile -NonInteractive -Command $command 2>&1 + # EncodedCommand umgeht alle Quoting-Probleme (Anführungszeichen, Sonderzeichen) + $encodedCmd = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($command)) + $output = & powershell.exe -NoProfile -NonInteractive -EncodedCommand $encodedCmd 2>&1 $stdoutLines = @($output | Where-Object { $_ -isnot [System.Management.Automation.ErrorRecord] }) $stderrLines = @($output | Where-Object { $_ -is [System.Management.Automation.ErrorRecord] }) | ForEach-Object { $_.ToString() }