From 840880ba7fd009e21a798a57253ecae10fbbe77d Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Thu, 21 Jul 2022 12:53:13 -0400 Subject: [PATCH 1/2] Fixes #1820 --- CHANGELOG.md | 3 +++ .../MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e31e59658a..76ebfb2c71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ # UNRELEASED +* EXOTransportRule + * Fixed issue where the MessageContainsDataClassifications property was not properly extracted due to single quote exiting. + FIXES [#1820](https://github.com/microsoft/Microsoft365DSC/issues/1820) * IntuneDeviceConfigurationPolicyWindows10 * Fixed issue where the edgeSearchEngine value was not properly retrieved. FIXES [#1783](https://github.com/microsoft/Microsoft365DSC/issues/1783) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 index cdec227327..6b43fea484 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 @@ -888,7 +888,7 @@ function Get-TargetResource ManagerAddresses = $TransportRule.ManagerAddresses ManagerForEvaluatedUser = $TransportRule.ManagerForEvaluatedUser MessageContainsAllDataClassifications = $TransportRule.MessageContainsAllDataClassifications - MessageContainsDataClassifications = $TransportRule.MessageContainsDataClassifications + MessageContainsDataClassifications = $TransportRule.MessageContainsDataClassifications.Replace('"', "'") MessageSizeOver = $TransportRule.MessageSizeOver MessageTypeMatches = $TransportRule.MessageTypeMatches Mode = $TransportRule.Mode From c57883e5b4e2ad1f3f50f3771efd00e97be3bada Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Thu, 21 Jul 2022 13:10:33 -0400 Subject: [PATCH 2/2] Update MSFT_EXOTransportRule.psm1 --- .../MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 index 6b43fea484..08f2304b03 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOTransportRule/MSFT_EXOTransportRule.psm1 @@ -766,6 +766,11 @@ function Get-TargetResource } else { + $MessageContainsDataClassificationsValue = $null + if ($null -ne $TransportRule.MessageContainsDataClassifications) + { + $MessageContainsDataClassificationsValue = $TransportRule.MessageContainsDataClassifications.Replace('"', "'") + } $result = @{ Name = $TransportRule.Name ADComparisonAttribute = $TransportRule.ADComparisonAttribute @@ -888,7 +893,7 @@ function Get-TargetResource ManagerAddresses = $TransportRule.ManagerAddresses ManagerForEvaluatedUser = $TransportRule.ManagerForEvaluatedUser MessageContainsAllDataClassifications = $TransportRule.MessageContainsAllDataClassifications - MessageContainsDataClassifications = $TransportRule.MessageContainsDataClassifications.Replace('"', "'") + MessageContainsDataClassifications = $MessageContainsDataClassificationsValue MessageSizeOver = $TransportRule.MessageSizeOver MessageTypeMatches = $TransportRule.MessageTypeMatches Mode = $TransportRule.Mode