diff --git a/CHANGELOG.md b/CHANGELOG.md index 461aaabbf7..4f883a0f7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ # UNRELEASED +* TeamsTenantDialPlan + * Fixed an issue where the Normalization Rules strings were not properly exited. + FIXES [#2096](https://github.com/microsoft/Microsoft365DSC/issues/2096) * TeamsUpdateManagementPolicy * Changed the format of the UpdateTimeOfDay parameter to not include date as part of an export. FIXES [#2062](https://github.com/microsoft/Microsoft365DSC/issues/2062) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.psm1 index 2d9f7c5758..b5751d323e 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsTenantDialPlan/MSFT_TeamsTenantDialPlan.psm1 @@ -593,7 +593,7 @@ function Get-M365DSCNormalizationRulesAsString return $null } $currentProperty = "@(" - + foreach ($rule in $params) { $currentProperty += "MSFT_TeamsVoiceNormalizationRule{`r`n" @@ -609,7 +609,12 @@ function Get-M365DSCNormalizationRulesAsString } else { - $currentProperty += " " + $key + " = '" + $rule[$key] + "'`r`n" + $value = $rule[$key] + if (-not [System.String]::IsNullOrEmpty($value)) + { + $value = $value.Replace("'", "''") + } + $currentProperty += " " + $key + " = '" + $value + "'`r`n" } } $currentProperty += " }"