From 592f9ef909aa07e43e6e7cb1eaad2837c33cce49 Mon Sep 17 00:00:00 2001 From: "manuel.maier" Date: Tue, 13 Oct 2026 17:02:01 +0200 Subject: [PATCH] Dateien nach "/" hochladen --- Setup-SMTPGraphRelay.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Setup-SMTPGraphRelay.ps1 b/Setup-SMTPGraphRelay.ps1 index 2e27bce..f63d822 100644 --- a/Setup-SMTPGraphRelay.ps1 +++ b/Setup-SMTPGraphRelay.ps1 @@ -1145,19 +1145,21 @@ function Show-Menu { if ($installedVerStr) { Write-Host "Installierte Version: $installedVerStr" -ForegroundColor DarkGray - # Online-Pruefung im Hintergrund (mit Timeout-Sicherung) try { $remoteInfo = Get-RemoteVersion $remoteVerStr = [string]$remoteInfo.Version - $cmp = Compare-RelayVersions -Installed ($installedVerStr) -Remote ($remoteVerStr) - if ($cmp -lt 0) { + # Robustere Auswertung statt [version]-Cast-Problemen + $vInst = [version]$installedVerStr + $vRemote = [version]$remoteVerStr + + if ($vRemote -gt $vInst) { Write-Host "Update verfuegbar: $remoteVerStr (Installiert ist $installedVerStr)" -ForegroundColor Yellow } else { Write-Host "Status: Auf dem neuesten Stand" -ForegroundColor DarkGray } } catch { - Write-Host "Status: Online-Pruefung fehlgeschlagen (kein Internet?)" -ForegroundColor DarkGray + Write-Host "Status: Online-Pruefung fehlgeschlagen: $_" -ForegroundColor DarkGray } } else { Write-Host "Installierte Version: (Nicht installiert / Unbekannt)" -ForegroundColor DarkGray