From 51e5966fa7b47046e9ccfaa985a2f3882b3285ff Mon Sep 17 00:00:00 2001 From: McKenzieCo <149072684+McKenzieCo@users.noreply.github.com> Date: Tue, 21 Jul 2026 17:15:07 -0400 Subject: [PATCH] Fix silent bulk compare crash: op_Addition on PSObject In Start-BulkCompareExportObjects the flat CSV row was built with '$compValue +=' where $compValue is a single PSCustomObject element of the result array. PowerShell has no op_Addition for PSObject, so every silent batch compare using the 'Exported Files with Intune Objects (Id)' provider threw 'Method invocation failed because [PSObject] does not contain a method named op_Addition' before Save-BulkCompareResults ran, and no CSV was produced. All other compare providers assign the row object directly; this aligns the export provider with them. Verified against a live tenant: the silent BulkCompare job now completes and writes the result CSV. Co-Authored-By: Claude Fable 5 --- Extensions/Compare.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/Compare.psm1 b/Extensions/Compare.psm1 index eac05b3..42f579e 100644 --- a/Extensions/Compare.psm1 +++ b/Extensions/Compare.psm1 @@ -706,7 +706,7 @@ function Start-BulkCompareExportObjects $objName = Get-GraphObjectName (?? $compObj.Object1 $compObj.Object2) $item.ObjectType foreach($compValue in $compObj.Result) { - $compValue += [PSCustomObject]@{ + $compValue = [PSCustomObject]@{ ObjectName = $objName Id = $compObj.Id Type = $compObj.ObjectType.Title