Skip to content

Commit e60bca5

Browse files
authored
Merge pull request #600 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 4b5dfc6 + c240553 commit e60bca5

File tree

6 files changed

+121
-46
lines changed

6 files changed

+121
-46
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,4 +341,5 @@ function Push-ExecScheduledCommand {
341341
Write-LogMessage -API 'Scheduler_UserTasks' -tenant $Tenant -tenantid $TenantInfo.customerId -message "Successfully executed task: $($task.Name)" -sev Info
342342
}
343343
Remove-Variable -Name ScheduledTaskId -Scope Script -ErrorAction SilentlyContinue
344+
return 'Task Completed Successfully.'
344345
}

Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Webhooks/Push-AuditLogTenantDownload.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ function Push-AuditLogTenantDownload {
4343
Write-Information ('Audit Logs: Found {0} searches, begin downloading' -f $LogSearches.Count)
4444
foreach ($Search in $LogSearches) {
4545
$SearchEntity = Get-CIPPAzDataTableEntity @LogSearchesTable -Filter "Tenant eq '$($TenantFilter)' and RowKey eq '$($Search.id)'"
46-
$SearchEntity.CippStatus = 'Processing'
46+
$SearchEntity | Add-Member -NotePropertyName CippStatus -NotePropertyValue 'Processing' -Force
4747
Add-CIPPAzDataTableEntity @LogSearchesTable -Entity $SearchEntity -Force
4848
try {
4949
Write-Information "Audit Log search: Processing search ID: $($Search.id) for tenant: $TenantFilter"
5050
$Downloads = New-CIPPAuditLogSearchResultsCache -TenantFilter $TenantFilter -searchId $Search.id
51-
$SearchEntity.CippStatus = 'Downloaded'
51+
$SearchEntity | Add-Member -NotePropertyName CippStatus -NotePropertyValue 'Downloaded' -Force
5252
} catch {
5353
if ($_.Exception.Message -match 'Request rate is large. More Request Units may be needed, so no changes were made. Please retry this request later.') {
54-
$SearchEntity.CippStatus = 'Pending'
54+
$SearchEntity | Add-Member -NotePropertyName CippStatus -NotePropertyValue 'Pending' -Force
5555
Write-Information "Audit Log search: Rate limit hit for $($SearchEntity.RowKey)."
5656
if ($SearchEntity.PSObject.Properties.Name -contains 'RetryCount') {
5757
$SearchEntity.RetryCount++
@@ -60,8 +60,8 @@ function Push-AuditLogTenantDownload {
6060
}
6161
} else {
6262
$Exception = [string](ConvertTo-Json -Compress -InputObject (Get-CippException -Exception $_))
63-
$SearchEntity | Add-Member -MemberType NoteProperty -Name Error -Value $Exception
64-
$SearchEntity.CippStatus = 'Failed'
63+
$SearchEntity | Add-Member -MemberType NoteProperty -Name Error -Value $Exception -Force
64+
$SearchEntity | Add-Member -NotePropertyName CippStatus -NotePropertyValue 'Failed' -Force
6565
Write-Information "Error processing audit log rules: $($_.Exception.Message)"
6666
}
6767

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function Start-ExtensionOrchestrator {
1010

1111
$Table = Get-CIPPTable -TableName Extensionsconfig
1212
$ExtensionConfig = (Get-AzDataTableEntity @Table).config
13-
if (Test-Json -Json $ExtensionConfig) {
13+
if ($ExtensionConfig -and (Test-Json -Json $ExtensionConfig)) {
1414
$Configuration = ($ExtensionConfig | ConvertFrom-Json)
1515
} else {
1616
$Configuration = @{}

0 commit comments

Comments
 (0)