From 71e6475497e5904119bbddc9ad70fe101103f41e Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Wed, 1 Apr 2026 00:27:23 +0200 Subject: [PATCH] updated bootstrapper --- scripts/Bootstrap/Install-AutopilotMonitor.ps1 | 5 ++--- src/Agent/AutopilotMonitor.Agent/buildcounter.txt | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/Bootstrap/Install-AutopilotMonitor.ps1 b/scripts/Bootstrap/Install-AutopilotMonitor.ps1 index 47ce51e1..59ba416b 100644 --- a/scripts/Bootstrap/Install-AutopilotMonitor.ps1 +++ b/scripts/Bootstrap/Install-AutopilotMonitor.ps1 @@ -295,8 +295,6 @@ try { Write-Log "Agent install mode completed successfully" Write-Log "===== Bootstrap Completed Successfully =====" - Write-Host "AutopilotMonitor agent installed and started successfully." - exit 0 } catch { @@ -305,8 +303,9 @@ catch { Write-Log "Stack trace: $($_.ScriptStackTrace)" Write-Log "Please check log file: $LogFile" + # some errors are captured by Intune but not fully visible in the UI (truncated, no stack trace), so also write critical info to stderr for better visibility. $errMsg = "AutopilotMonitor bootstrap failed: $($_.Exception.Message)" - if ($errMsg.Length -gt 2048) { $errMsg = $errMsg.Substring(0, 2045) + '...' } + if ($errMsg.Length -gt 2048) { $errMsg = $errMsg.Substring(0, 1045) + '...' } [Console]::Error.WriteLine($errMsg) exit 1 diff --git a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt index 3bee760d..611de253 100644 --- a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt +++ b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt @@ -1 +1 @@ -742 +743