Skip to content

Commit 0dc9ed5

Browse files
update
1 parent 0917115 commit 0dc9ed5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,13 @@ function Push-ExecScheduledCommand {
6666
}
6767

6868
Write-Host 'ran the command. Processing results'
69+
Write-Host "Results: $($results | ConvertTo-Json -Depth 10)"
6970
if ($item.command -like 'Get-CIPPAlert*') {
71+
Write-Host 'This is an alert task. Processing results as alerts.'
7072
$results = @($results)
7173
$TaskType = 'Alert'
7274
} else {
75+
Write-Host 'This is a scheduled task. Processing results as scheduled task.'
7376
$TaskType = 'Scheduled Task'
7477
if ($results -is [String]) {
7578
$results = @{ Results = $results }
@@ -81,7 +84,8 @@ function Push-ExecScheduledCommand {
8184
@{ Results = $Message }
8285
}
8386
}
84-
87+
Write-Host "Results after processing: $($results | ConvertTo-Json -Depth 10)"
88+
write0host 'Moving onto storing results'
8589
if ($results -is [string]) {
8690
$StoredResults = $results
8791
} else {

0 commit comments

Comments
 (0)