$ErrorActionPreference = 'Continue' while ($true) { $t = (Get-Date).ToString('o') try { $r = curl.exe -k https://localhost:3001/health 2>&1 Write-Output "$t - $r" } catch { Write-Output "$t - ERROR: $_" } Start-Sleep -Seconds 10 }