Skip to content

Commit 85e3a88

Browse files
committed
Update Start-CIPPOrchestrator.ps1
1 parent 10012b4 commit 85e3a88

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Modules/CIPPCore/Public/Entrypoints/Orchestrator Functions/Start-CIPPOrchestrator.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ function Start-CIPPOrchestrator {
4747
$QueueItem = [PSCustomObject]$InputObject.QueueFunction.Parameters
4848
}
4949
$BatchResult = & $QueueFuncName -Item $QueueItem
50-
$InputObject.Batch = @($BatchResult | Where-Object { $null -ne $_ })
51-
if ($InputObject.Batch.Count -eq 0) {
50+
$QueueBatch = @($BatchResult | Where-Object { $null -ne $_ })
51+
if ($QueueBatch.Count -eq 0) {
5252
Write-Information "CIPP-NG: QueueFunction '$QueueFuncName' returned 0 tasks for '$OrchestratorName' - skipping"
5353
return "CIPPNG-$OrchestratorName-NoTasks"
5454
}
55+
$InputObject | Add-Member -MemberType NoteProperty -Name 'Batch' -Value $QueueBatch -Force
5556
}
5657

5758
$BatchJson = ConvertTo-Json -InputObject @($InputObject.Batch) -Depth 10 -Compress

0 commit comments

Comments
 (0)