diff --git a/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 b/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 index 0227a49f..3370466b 100644 --- a/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 +++ b/SamplesV2/ContinuousIntegrationAndDelivery/PrePostDeploymentScript.Ver2.ps1 @@ -191,7 +191,8 @@ function Compare-TriggerPayload { $triggerTemplateJson = ConvertTo-Json -InputObject $triggerInTemplate.properties -Depth $MaxJsonDepth -EscapeHandling Default $updatedTemplateJson = Update-TriggerTemplate -templateJson $triggerTemplateJson -templateParameters $templateParameters $serializerOptions = New-Object System.Text.Json.JsonSerializerOptions -Property @{ PropertyNameCaseInsensitive = $True } - $payloadPSObject = $updatedTemplateJson | ConvertFrom-Json -Depth $MaxJsonDepth + $updatedTemplateJsonReplaced = $updatedTemplateJson.Replace('\', '\\') + $payloadPSObject = $updatedTemplateJsonReplaced | ConvertFrom-Json -Depth $MaxJsonDepth if ($triggerDeployed.Properties.RuntimeState -ne $payloadPSObject.runtimeState) { Write-Host "Change detected in '$($triggerDeployed.Name)' trigger payload - runtimeState changed" return $True;