Skip to content

Commit 549ccec

Browse files
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into dev
2 parents c76f109 + 332e371 commit 549ccec

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ function Push-SchedulerCIPPNotifications {
2525
$PartitionKey = Get-Date -UFormat '%Y%m%d'
2626
$Filter = "PartitionKey eq '{0}'" -f $PartitionKey
2727
$Currentlog = Get-CIPPAzDataTableEntity @Table -Filter $Filter | Where-Object {
28-
$_.API -In $Settings -and $_.SentAsAlert -ne $true -and $_.Severity -In $severity
28+
$_.API -in $Settings -and $_.SentAsAlert -ne $true -and $_.Severity -in $severity
2929
}
3030
$StandardsTable = Get-CIPPTable -tablename CippStandardsAlerts
3131
$CurrentStandardsLogs = Get-CIPPAzDataTableEntity @StandardsTable -Filter $Filter | Where-Object {
32-
$_.SentAsAlert -ne $true
32+
$_.sentAsAlert -ne $true
3333
}
3434
Write-Information "Alerts: $($Currentlog.count) found"
3535
Write-Information "Standards: $($CurrentStandardsLogs.count) found"
@@ -58,7 +58,7 @@ function Push-SchedulerCIPPNotifications {
5858
$Subject = "$($Tenant): Standards are out of sync for $tenant"
5959
$HTMLContent = New-CIPPAlertTemplate -Data $Data -Format 'html' -InputObject 'standards'
6060
Send-CIPPAlert -Type 'email' -Title $Subject -HTMLContent $HTMLContent.htmlcontent -TenantFilter $tenant -APIName 'Alerts'
61-
$updateStandards = $CurrentStandardsLogs | ForEach-Object { $_.SentAsAlert = $true; $_ }
61+
$updateStandards = $CurrentStandardsLogs | ForEach-Object { $_.sentAsAlert = $true; $_ }
6262
if ($updateStandards) { Add-CIPPAzDataTableEntity @StandardsTable -Entity $updateStandards -Force }
6363
}
6464
}
@@ -83,7 +83,7 @@ function Push-SchedulerCIPPNotifications {
8383
$JSONContent = New-CIPPAlertTemplate -Data $Data -Format 'json' -InputObject 'table'
8484
$CurrentStandardsLogs | ConvertTo-Json -Compress
8585
Send-CIPPAlert -Type 'webhook' -JSONContent $JSONContent -TenantFilter $Tenant -APIName 'Alerts'
86-
$updateStandards = $CurrentStandardsLogs | ForEach-Object { $_.SentAsAlert = $true; $_ }
86+
$updateStandards = $CurrentStandardsLogs | ForEach-Object { $_.sentAsAlert = $true; $_ }
8787
if ($updateStandards) { Add-CIPPAzDataTableEntity @StandardsTable -Entity $updateStandards -Force }
8888
}
8989

@@ -108,7 +108,7 @@ function Push-SchedulerCIPPNotifications {
108108
$Subject = "$($standardsTenant): Standards are out of sync for $standardsTenant"
109109
$HTMLContent = New-CIPPAlertTemplate -Data $Data -Format 'html' -InputObject 'standards'
110110
Send-CIPPAlert -Type 'psa' -Title $Subject -HTMLContent $HTMLContent.htmlcontent -TenantFilter $standardsTenant -APIName 'Alerts'
111-
$updateStandards = $CurrentStandardsLogs | ForEach-Object { $_.SentAsAlert = $true; $_ }
111+
$updateStandards = $CurrentStandardsLogs | ForEach-Object { $_.sentAsAlert = $true; $_ }
112112
if ($updateStandards) { Add-CIPPAzDataTableEntity @StandardsTable -Entity $updateStandards -Force }
113113
}
114114
} catch {

0 commit comments

Comments
 (0)