diff --git a/CHANGELOG.md b/CHANGELOG.md index 353384db3f..cd9b13bb0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ * TeamsUserPolicyAssignment * Initial release. FIXES [#3777](https://github.com/microsoft/Microsoft365DSC/issues/3777) +* MISC + * Fixes fancy quotes in complex objects for extraction. # 1.23.1011.1 diff --git a/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 index 30f7fc9122..53c6531a34 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 @@ -447,6 +447,14 @@ function Get-M365DSCDRGComplexTypeToString { $currentProperty = $null } + + if ($null -ne $currentProperty) + { + $fancySingleQuotes = "[\u2019\u2018]" + $fancyDoubleQuotes = "[\u201C\u201D]" + $currentProperty = [regex]::Replace($currentProperty, $fancySingleQuotes, "''") + $currentProperty = [regex]::Replace($currentProperty, $fancyDoubleQuotes, '"') + } return $currentProperty }