Skip to content

Commit af75f3d

Browse files
committed
fix standard reruns
1 parent f8b962b commit af75f3d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Modules/CIPPCore/Public/Entrypoints/Activity Triggers/Standards/Push-CIPPStandard.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ function Push-CIPPStandard {
1414
Write-Information "We'll be running $FunctionName"
1515

1616
if ($Standard -in @('IntuneTemplate', 'ConditionalAccessTemplate')) {
17-
$API = "$Standard_$($Item.templateId)_$($Item.Settings.TemplateList.value)"
17+
$API = "$($Standard)_$($Item.templateId)_$($Item.Settings.TemplateList.value)"
1818
} else {
19-
$API = "$Standard_$($Item.templateId)"
19+
$API = "$($Standard)_$($Item.templateId)"
2020
}
2121

2222
$Rerun = Test-CIPPRerun -Type Standard -Tenant $Tenant -API $API

Modules/CIPPCore/Public/Test-CIPPRerun.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ function Test-CIPPRerun {
1919
$EstimatedNextRun = $CurrentUnixTime + $EstimatedDifference
2020

2121
try {
22-
$RerunData = Get-CIPPAzDataTableEntity @RerunTable -filter "PartitionKey eq '$($TenantFilter)' and RowKey eq '$($Type)_$($API)'"
22+
$RerunData = Get-CIPPAzDataTableEntity @RerunTable -filter "PartitionKey eq '$($TenantFilter)'" | Where-Object { $_.RowKey -match "^$($Type)_$($API)" }
2323
if ($ClearAll.IsPresent) {
2424
$AllRerunData = Get-CIPPAzDataTableEntity @RerunTable
2525
if ($AllRerunData) {
26+
Write-Information "Clearing all rerun cache entries for $($Type)_$($API)"
2627
Remove-AzDataTableEntity @RerunTable -Entity $AllRerunData -Force
2728
}
2829
return $false

0 commit comments

Comments
 (0)