Skip to content

[Issue] SetupLogReviewer doesn't handle logs gracefully #2501

@dpaulson45

Description

@dpaulson45

Describe the issue
Getting a failure to run the script because we can't properly determine the last install attempt section. Then fail out the entire script.

Expected behavior
Try to handle these unexpected behaviors better.

Script Output

.\SetupLogReviewer.ps1 "C:\DesktopNonOneDrive\Temp\ExchangeSetup (1)\ExchangeSetup.log"
Setup Log Reviewer Version:
Setup Mode: Upgrade
Setup.exe Run Date: 02/09/2026 08:33:49
Setup.exe Build Number: 15.2.2562.17


----------------Error Information----------------
Test-PrerequisiteCheck : Cannot index into a null array.
Inner Exception:    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
   at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
   at System.Management.Automation.PSScriptCmdlet.DoProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
Position Message: At C:\GitHub\CSS-Exchange\Setup\Shared\SetupLogReviewerLogic.ps1:33 char:43
+             $result = $SetupLogReviewer | & $test
+                                           ~~~~~~~
Script Stack: at Test-PrerequisiteCheck<Process>, C:\GitHub\CSS-Exchange\Setup\SetupLogReviewer\Checks\FindContext\Test-PrerequisiteCheck.ps1: line 103
at InvokeTests, C:\GitHub\CSS-Exchange\Setup\Shared\SetupLogReviewerLogic.ps1: line 33
at Invoke-SetupLogReviewer, C:\GitHub\CSS-Exchange\Setup\Shared\SetupLogReviewerLogic.ps1: line 88
at <ScriptBlock>, C:\GitHub\CSS-Exchange\Setup\SetupLogReviewer\SetupLogReviewer.ps1: line 26
at <ScriptBlock>, <No file>: line 1
-------------------------------------------------


WARNING: Ran into an issue with the script. If possible please email the Setup Log to 'ExToolsFeedback@microsoft.com', or at least notify them of the issue.

Additional context
This appears to be similar to a previous issue #716. Need to make sure that we add in a pester test for this and understand why this issue came back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    IssueSetupSetup tools issueSetup Log ReviewerThis item needs to be addressed within the log reviewer of Setup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions