File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Modules/CIPPCore/Public/Entrypoints/Timer Functions Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ function Start-DurableCleanup {
4949 if ($PSCmdlet.ShouldProcess ($_.PartitionKey , ' Terminate Orchestrator' )) {
5050 $Orchestrator = Get-CIPPAzDataTableEntity @Table - Filter " PartitionKey eq '$ ( $Orchestrator.PartitionKey ) '"
5151 $Orchestrator.RuntimeStatus = ' Failed'
52- $Orchestrator.CustomStatus = " Terminated by Durable Cleanup - Exceeded max duration of $MaxDuration seconds"
52+ if ($Orchestrator.PSObject.Properties.Name -contains ' CustomStatus' ) {
53+ $Orchestrator.CustomStatus = " Terminated by Durable Cleanup - Exceeded max duration of $MaxDuration seconds"
54+ } else {
55+ $Orchestrator | Add-Member - MemberType NoteProperty - Name CustomStatus - Value " Terminated by Durable Cleanup - Exceeded max duration of $MaxDuration seconds"
56+ }
5357 Update-AzDataTableEntity @Table - Entity $Orchestrator
5458 $CleanupCount ++
5559 }
You can’t perform that action at this time.
0 commit comments