diff --git a/.github/workflows/CodeCoverage.yml b/.github/workflows/CodeCoverage.yml index b18987fd57..656062ed9f 100644 --- a/.github/workflows/CodeCoverage.yml +++ b/.github/workflows/CodeCoverage.yml @@ -17,81 +17,9 @@ jobs: - name: Install Modules shell: pwsh run: | - $Dependencies = @( - @{ - ModuleName = 'DSCParser' - }, - @{ - ModuleName = 'ExchangeOnlineManagement' - }, - @{ - ModuleName = 'Microsoft.Graph.Applications' - }, - @{ - ModuleName = 'Microsoft.Graph.Authentication' - }, - @{ - ModuleName = 'Microsoft.Graph.DeviceManagement' - }, - @{ - ModuleName = 'Microsoft.Graph.DeviceManagement.Administration' - }, - @{ - ModuleName = 'Microsoft.Graph.DeviceManagement.Enrolment' - }, - @{ - ModuleName = 'Microsoft.Graph.Devices.CorporateManagement' - }, - @{ - ModuleName = 'Microsoft.Graph.Groups' - }, - @{ - ModuleName = 'Microsoft.Graph.Identity.DirectoryManagement' - }, - @{ - ModuleName = 'Microsoft.Graph.Identity.Governance' - }, - @{ - ModuleName = 'Microsoft.Graph.Identity.SignIns' - }, - @{ - ModuleName = 'Microsoft.Graph.Planner' - }, - @{ - ModuleName = 'Microsoft.Graph.Teams' - }, - @{ - ModuleName = 'Microsoft.Graph.Users' - }, - @{ - ModuleName = 'Microsoft.Graph.Users.Actions' - }, - @{ - ModuleName = 'Microsoft.PowerApps.Administration.PowerShell' - }, - @{ - ModuleName = 'MicrosoftTeams' - }, - @{ - ModuleName = "MSCloudLoginAssistant" - }, - @{ - ModuleName = 'PnP.PowerShell' - }, - @{ - ModuleName = 'ReverseDSC' - } - ) - - foreach ($module in $Dependencies) - { - Install-Module $module.ModuleName -Force -Scope AllUsers - Import-Module $module.ModuleName -Force - } - + Install-Module ReverseDSC -Force -Scope AllUsers Install-Module PSDesiredStateConfiguration -Force -Scope AllUsers - Install-Module Pester -Force -SkipPublisherCheck -RequiredVersion 5.4.0 -Scope AllUsers - Install-Module Profiler -Force -Scope AllUsers + Install-Module Pester -Force -SkipPublisherCheck -Scope AllUsers [System.Environment]::SetEnvironmentVariable('M365DSCTelemetryEnabled', $false, [System.EnvironmentVariableTarget]::Machine); - name: Run Quality Checks shell: pwsh diff --git a/CHANGELOG.md b/CHANGELOG.md index ecf9575775..f6bb21da9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ * SCSensitivityLabel * Remove property Disabled from schema FIXES [#3193](https://github.com/microsoft/Microsoft365DSC/issues/3193) + * Corrected issue where SiteAndGroupExternalSharingControlType wasn't + applied correctly with existing labels + FIXES [#3210](https://github.com/microsoft/Microsoft365DSC/issues/3210) * TeamsTeam * Fixes an error when trying to extract teams using a Service Principal. FIXES [#3183](https://github.com/microsoft/Microsoft365DSC/issues/3183) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCSensitivityLabel/MSFT_SCSensitivityLabel.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCSensitivityLabel/MSFT_SCSensitivityLabel.psm1 index 88d1e7212c..d53ae1df83 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCSensitivityLabel/MSFT_SCSensitivityLabel.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCSensitivityLabel/MSFT_SCSensitivityLabel.psm1 @@ -832,6 +832,12 @@ function Set-TargetResource $SetParams['LocaleSettings'] = $locale } + if ($SetParams.ContainsKey('SiteAndGroupExternalSharingControlType')) + { + $SetParams.SiteExternalSharingControlType = $SetParams.SiteAndGroupExternalSharingControlType + $SetParams.Remove('SiteAndGroupExternalSharingControlType') + } + #Remove unused parameters for Set-Label cmdlet $SetParams.Remove('Name') | Out-Null