Skip to content

Commit 87edcf1

Browse files
rerun for exchangemonitors
1 parent 8429f25 commit 87edcf1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Modules/CIPPCore/Public/Alerts/Get-CIPPAlertQuarantineReleaseRequests.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
$TenantFilter
1212
)
1313

14+
#Add rerun protection: This Monitor can only run once every hour.
15+
$Rerun = Test-CIPPRerun -TenantFilter $TenantFilter -Type 'ExchangeMonitor' -API 'Get-CIPPAlertQuarantineReleaseRequests'
16+
if ($Rerun) {
17+
return $true
18+
}
1419
$HasLicense = Test-CIPPStandardLicense -StandardName 'QuarantineReleaseRequests' -TenantFilter $TenantFilter -RequiredCapabilities @(
1520
'EXCHANGE_S_STANDARD',
1621
'EXCHANGE_S_ENTERPRISE',
@@ -20,7 +25,7 @@
2025
)
2126

2227
if (-not $HasLicense) {
23-
return
28+
return $true
2429
}
2530

2631
try {

Modules/CIPPCore/Public/Test-CIPPRerun.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function Test-CIPPRerun {
2121
'Standard' { 9800 } # 2 hours 45 minutes ish.
2222
'BPA' { 85000 } # 24 hours ish.
2323
'CippTests' { 85000 } # 24 hours ish.
24+
'Get-CIPPAlertQuarantineReleaseRequests' { 3500 } #about an hour
2425
default { throw "Unknown type: $Type" }
2526
}
2627
}

0 commit comments

Comments
 (0)