Skip to content

Commit 6bf2ef4

Browse files
authored
Merge pull request #782 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 4160888 + 80c4477 commit 6bf2ef4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Push-ExecScheduledCommand.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,12 @@ function Push-ExecScheduledCommand {
317317
}
318318
Write-LogMessage -API 'Scheduler_UserTasks' -tenant $Tenant -tenantid $TenantInfo.customerId -message "Failed to execute task $($task.Name): $errorMessage" -sev Error -LogData (Get-CippExceptionData -Exception $_.Exception)
319319
}
320-
Write-Information 'Sending task results to target. Updating the task state.'
321320

322321
# For orchestrator-based commands, skip post-execution alerts as they will be handled by the orchestrator's post-execution function
323322
if ($Results -and $Item.Command -notin $OrchestratorBasedCommands) {
323+
Write-Information "Sending task results to post execution target(s): $($Task.PostExecution -join ', ')."
324324
Send-CIPPScheduledTaskAlert -Results $Results -TaskInfo $task -TenantFilter $Tenant -TaskType $TaskType
325325
}
326-
Write-Information 'Sent the results to the target. Updating the task state.'
327326

328327
try {
329328
# For orchestrator-based commands, skip task state update as it will be handled by post-execution

0 commit comments

Comments
 (0)