From 294dd5bdedb9001518df3f7b3b2b2de34da2e5b0 Mon Sep 17 00:00:00 2001 From: Ricardo Mestre Date: Wed, 20 Sep 2023 13:05:36 +0100 Subject: [PATCH 1/3] Write properties properly indented and in new line --- CHANGELOG.md | 6 ++++++ .../Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0297ccb86..c8a555a696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change log for Microsoft365DSC +# UNRELEASED + +* MISC + * M365DSCDRGUtil: Write properties properly indented and in new line + FIXES [#3634](https://github.com/microsoft/Microsoft365DSC/issues/3634) + # 1.23.920.1 * O365OrgSettings diff --git a/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 index 8ab212b278..eacf6a5e14 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 @@ -400,7 +400,7 @@ function Get-M365DSCDRGComplexTypeToString $currentValue = $ComplexObject[$key] if ($currentValue.GetType().Name -eq 'String') { - $currentValue = $ComplexObject[$key].Replace("'", "''").Replace("’", "''") + $currentValue = $ComplexObject[$key].Replace("'", "''").Replace("�", "''") } $currentProperty += Get-M365DSCDRGSimpleObjectTypeToString -Key $key -Value $currentValue -Space ($indent) } @@ -430,17 +430,17 @@ function Get-M365DSCDRGComplexTypeToString } $currentProperty += "$indent}" - #if ($isArray -or $IndentLevel -gt 4) - #{ - #$currentProperty += "`r`n" - #} + if ($isArray -or $IndentLevel -gt 4) + { + $currentProperty += "`r`n" + } #Indenting last parenthese when the cim instance is an array - <#if ($IndentLevel -eq 5) + if ($IndentLevel -eq 5) { $indent = ' ' * ($IndentLevel -2) $currentProperty += $indent - }#> + } $emptyCIM = $currentProperty.replace(' ', '').replace("`r`n", '') if ($emptyCIM -eq "MSFT_$CIMInstanceName{}") From 6d43a44ec86b0e6bee473d7ee46bce58ba2bb4d7 Mon Sep 17 00:00:00 2001 From: Ricardo Mestre Date: Wed, 20 Sep 2023 13:05:55 +0100 Subject: [PATCH 2/3] Fix typo --- Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 index eacf6a5e14..65bd393b92 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCDRGUtil.psm1 @@ -435,7 +435,7 @@ function Get-M365DSCDRGComplexTypeToString $currentProperty += "`r`n" } - #Indenting last parenthese when the cim instance is an array + #Indenting last parenthesis when the cim instance is an array if ($IndentLevel -eq 5) { $indent = ' ' * ($IndentLevel -2) From 91c8362cc9e5f55e5b857f8fcfcd8c87f8b2cbb5 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Wed, 20 Sep 2023 11:37:08 -0400 Subject: [PATCH 3/3] Release 1.23.920.2 --- CHANGELOG.md | 4 ++- .../Dependencies/Manifest.psd1 | 34 +++++++++---------- Modules/Microsoft365DSC/Microsoft365DSC.psd1 | 5 +-- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8a555a696..c814cca2cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # Change log for Microsoft365DSC -# UNRELEASED +# 1.23.920.2 +* DEPENDENCIES + * Rolled back Microsoft.Graph to version 2.5.0. * MISC * M365DSCDRGUtil: Write properties properly indented and in new line FIXES [#3634](https://github.com/microsoft/Microsoft365DSC/issues/3634) diff --git a/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 b/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 index 944e700441..ca06a634d4 100644 --- a/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 +++ b/Modules/Microsoft365DSC/Dependencies/Manifest.psd1 @@ -10,71 +10,71 @@ }, @{ ModuleName = 'Microsoft.Graph.Applications' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Authentication' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.DeviceManagement' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.Devices.CorporateManagement' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.DeviceManagement.Administration' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.DeviceManagement.Enrollment' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.Identity.DirectoryManagement' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.Identity.Governance' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.Identity.SignIns' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.Reports' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.Teams' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.DeviceManagement.Administration' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Beta.DirectoryObjects' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Groups' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Planner' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Users' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.Graph.Users.Actions' - RequiredVersion = '2.6.0' + RequiredVersion = '2.5.0' }, @{ ModuleName = 'Microsoft.PowerApps.Administration.PowerShell' diff --git a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 index f5fb3ed0d4..7971b9a7ea 100644 --- a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 +++ b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 @@ -11,7 +11,7 @@ # RootModule = '' # Version number of this module. - ModuleVersion = '1.23.920.1' + ModuleVersion = '1.23.920.2' # Supported PSEditions # CompatiblePSEditions = @() @@ -140,7 +140,8 @@ IconUri = 'https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true' # ReleaseNotes of this module - ReleaseNotes = '* O365OrgSettings + ReleaseNotes = '** 1.23.920.2 rolls back the Graph dependencies to version 2.5.0 + * O365OrgSettings * Fixes and issue where a the wrong url was being used in some of the API calls, resulting in null returns for some properties in the Get method. * SPOSharingSettings