From f8180028bf423b6aec915e8bd7265b00e124c725 Mon Sep 17 00:00:00 2001 From: timsto <34174209+Timsto@users.noreply.github.com> Date: Tue, 2 Mar 2021 23:36:17 +0100 Subject: [PATCH 01/10] update DeviceState Naming because of API Changes 'includeDeviceStates' and 'excludeDeviceStates' are no longer supported. Please use 'includeDevices' and 'excludeDevices' going forward. For examples, please see API documentation at https://docs.microsoft.com/en-us/graph/api/conditionalaccessroot-post-policies?view=graph-rest-beta. --- .../1-ConfigureAADConditionalAccessPolicy.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Microsoft365DSC/Examples/Resources/AADConditionalAccessPolicy/1-ConfigureAADConditionalAccessPolicy.ps1 b/Modules/Microsoft365DSC/Examples/Resources/AADConditionalAccessPolicy/1-ConfigureAADConditionalAccessPolicy.ps1 index 8a7effec50..f06120a7cd 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/AADConditionalAccessPolicy/1-ConfigureAADConditionalAccessPolicy.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/AADConditionalAccessPolicy/1-ConfigureAADConditionalAccessPolicy.ps1 @@ -24,14 +24,14 @@ Configuration Example DisplayName = "Allin-example"; Ensure = "Present"; ExcludeApplications = @("803ee9ca-3f7f-4824-bd6e-0b99d720c35c", "00000012-0000-0000-c000-000000000000", "00000007-0000-0000-c000-000000000000", "Office365"); - ExcludeDeviceStates = @("Compliant", "DomainJoined"); + ExcludeDevice = @("Compliant", "DomainJoined"); ExcludeLocations = @("Blocked Countries"); ExcludePlatforms = @("Windows", "WindowsPhone", "MacOS"); ExcludeRoles = @("Company Administrator", "Application Administrator", "Application Developer", "Cloud Application Administrator", "Cloud Device Administrator"); ExcludeUsers = @("admin@contoso.com", "AAdmin@contoso.com", "CAAdmin@contoso.com", "AllanD@contoso.com", "AlexW@contoso.com", "GuestsOrExternalUsers"); GrantControlOperator = "OR"; IncludeApplications = @("All"); - IncludeDeviceStates = @("All"); + IncludeDevice = @("All"); IncludeLocations = @("AllTrusted"); IncludePlatforms = @("Android", "IOS"); IncludeUserActions = @(); From bc9460f51b22117d1c9a7d2d9e2f4442bd40df77 Mon Sep 17 00:00:00 2001 From: timsto <34174209+Timsto@users.noreply.github.com> Date: Tue, 2 Mar 2021 23:40:07 +0100 Subject: [PATCH 02/10] update DeviceState Naming because of API Changes 'includeDeviceStates' and 'excludeDeviceStates' are no longer supported. Please use 'includeDevices' and 'excludeDevices' going forward. For examples, please see API documentation at https://docs.microsoft.com/en-us/graph/api/conditionalaccessroot-post-policies?view=graph-rest-beta. --- .../MSFT_AADConditionalAccessPolicy.psm1 | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1 index 0a0067f6fa..21a8d5c29c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1 @@ -76,11 +76,11 @@ function Get-TargetResource #ConditionalAccessDevicesCondition [Parameter()] [System.String[]] - $IncludeDeviceStates, + $includeDevices, [Parameter()] [System.String[]] - $ExcludeDeviceStates, + $excludeDevices, #Further conditions [Parameter()] @@ -614,9 +614,9 @@ function Get-TargetResource #no translation needed IncludeLocations = $IncludeLocations ExcludeLocations = $ExcludeLocations - IncludeDeviceStates = [System.String[]]$Policy.Conditions.Devices.IncludeDeviceStates + includeDevices = [System.String[]]$Policy.Conditions.Devices.includeDevices #no translation needed - ExcludeDeviceStates = [System.String[]]$Policy.Conditions.Devices.ExcludeDeviceStates + excludeDevices = [System.String[]]$Policy.Conditions.Devices.excludeDevices #no translation needed UserRiskLevels = [System.String[]]$Policy.Conditions.UserRiskLevels #no translation needed @@ -733,11 +733,11 @@ function Set-TargetResource #ConditionalAccessDevicesCondition [Parameter()] [System.String[]] - $IncludeDeviceStates, + $includeDevices, [Parameter()] [System.String[]] - $ExcludeDeviceStates, + $excludeDevices, #Further conditions [Parameter()] @@ -1373,13 +1373,13 @@ function Set-TargetResource } Write-Verbose -Message "Set-Targetresource: process device states" - if ($IncludeDeviceStates -or $ExcludeDeviceStates) + if ($includeDevices -or $excludeDevices) { #create and provision Device condition object if used $conditions.Devices = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessDevicesCondition - $conditions.Devices.IncludeDeviceStates = $IncludeDeviceStates + $conditions.Devices.includeDevices = $includeDevices #no translation or conversion needed - $conditions.Devices.ExcludeDeviceStates = $ExcludeDeviceStates + $conditions.Devices.excludeDevices = $excludeDevices #no translation or conversion needed } Write-Verbose -Message "Set-Targetresource: process risk levels and app types" @@ -1627,11 +1627,11 @@ function Test-TargetResource #ConditionalAccessDevicesCondition [Parameter()] [System.String[]] - $IncludeDeviceStates, + $includeDevices, [Parameter()] [System.String[]] - $ExcludeDeviceStates, + $excludeDevices, #Further conditions [Parameter()] From ff38fb6ed30a1618d8891dade1515fbb84d52929 Mon Sep 17 00:00:00 2001 From: timsto <34174209+Timsto@users.noreply.github.com> Date: Tue, 2 Mar 2021 23:41:28 +0100 Subject: [PATCH 03/10] update DeviceState Naming because of API Changes 'includeDeviceStates' and 'excludeDeviceStates' are no longer supported. Please use 'includeDevices' and 'excludeDevices' going forward. For examples, please see API documentation at https://docs.microsoft.com/en-us/graph/api/conditionalaccessroot-post-policies?view=graph-rest-beta. --- .../MSFT_AADConditionalAccessPolicy.schema.mof | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.schema.mof index 6ecfec08ae..bbbfb334a5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.schema.mof +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.schema.mof @@ -17,8 +17,8 @@ class MSFT_AADConditionalAccessPolicy : OMI_BaseResource [Write, Description("Client Device Platforms out of scope of the Policy.")] String ExcludePlatforms[]; [Write, Description("AAD Named Locations in scope of the Policy.")] String IncludeLocations[]; [Write, Description("AAD Named Locations out of scope of the Policy.")] String ExcludeLocations[]; - [Write, Description("Client Device Compliance states in scope of the Policy.")] String IncludeDeviceStates[]; - [Write, Description("Client Device Compliance states out of scope of the Policy.")] String ExcludeDeviceStates[]; + [Write, Description("Client Device Compliance states in scope of the Policy.")] String includeDevices[]; + [Write, Description("Client Device Compliance states out of scope of the Policy.")] String excludeDevices[]; [Write, Description("AAD Identity Protection User Risk Levels in scope of the Policy.")] String UserRiskLevels[]; [Write, Description("AAD Identity Protection Sign-in Risk Levels in scope of the Policy.")] String SignInRiskLevels[]; [Write, Description("Client App types in scope of the Policy.")] String ClientAppTypes[]; From 3ca6afbb020d24aa0d582c2598bb74e029803d0a Mon Sep 17 00:00:00 2001 From: timsto <34174209+Timsto@users.noreply.github.com> Date: Tue, 2 Mar 2021 23:44:08 +0100 Subject: [PATCH 04/10] update DeviceState Naming because of API Changes 'includeDeviceStates' and 'excludeDeviceStates' are no longer supported. Please use 'includeDevices' and 'excludeDevices' going forward. For examples, please see API documentation at https://docs.microsoft.com/en-us/graph/api/conditionalaccessroot-post-policies?view=graph-rest-beta. --- ...65DSC.AADConditionalAccessPolicy.Tests.ps1 | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADConditionalAccessPolicy.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADConditionalAccessPolicy.Tests.ps1 index afd2e2c5de..e947eee4f0 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADConditionalAccessPolicy.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADConditionalAccessPolicy.Tests.ps1 @@ -58,7 +58,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "Allin" Ensure = "Present" ExcludeApplications = @("00000012-0000-0000-c000-000000000000", "Office365") - ExcludeDeviceStates = @("Compliant", "DomainJoined") + excludeDevices = @("Compliant", "DomainJoined") ExcludeGroups = @("Group 01") ExcludeLocations = "Contoso LAN" ExcludePlatforms = @("Windows", "WindowsPhone", "MacOS") @@ -68,7 +68,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { GrantControlOperator = "AND" Id = "bcc0cf19-ee89-46f0-8e12-4b89123ee6f9" IncludeApplications = @("All") - IncludeDeviceStates = @("All") + includeDevices = @("All") IncludeGroups = @("Group 01") IncludeLocations = "AllTrusted" IncludePlatforms = @("Android", "IOS") @@ -139,7 +139,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "Allin" Ensure = "Present" ExcludeApplications = @("00000012-0000-0000-c000-000000000000", "Office365") - ExcludeDeviceStates = @("Compliant", "DomainJoined") + excludeDevices = @("Compliant", "DomainJoined") ExcludeGroups = @("Group 01") ExcludeLocations = "Contoso LAN" ExcludePlatforms = @("Windows", "WindowsPhone", "MacOS") @@ -149,7 +149,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { GrantControlOperator = "AND" Id = "bcc0cf19-ee89-46f0-8e12-4b89123ee6f9" IncludeApplications = @("All") - IncludeDeviceStates = @("All") + includeDevices = @("All") IncludeGroups = @("Group 01") IncludeLocations = "AllTrusted" IncludePlatforms = @("Android", "IOS") @@ -194,8 +194,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ExcludeLocations = "9e4ca5f3-0ba9-4257-b906-74d3038ac970" } Devices = @{ - IncludeDeviceStates = @("All") - ExcludeDeviceStates = @("Compliant", "DomainJoined") + includeDevices = @("All") + excludeDevices = @("Compliant", "DomainJoined") } ClientAppTypes = @("Browser", "MobileAppsAndDesktopClients") SignInRiskLevels = @("High") @@ -276,7 +276,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "Allin" Ensure = "Present" ExcludeApplications = @("00000012-0000-0000-c000-000000000000", "Office365") - ExcludeDeviceStates = @("Compliant", "DomainJoined") + excludeDevices = @("Compliant", "DomainJoined") ExcludeGroups = @("Group 01") ExcludeLocations = "Contoso LAN" ExcludePlatforms = @("Windows", "WindowsPhone", "MacOS") @@ -286,7 +286,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { GrantControlOperator = "AND" Id = "bcc0cf19-ee89-46f0-8e12-4b89123ee6f9" IncludeApplications = @("All") - IncludeDeviceStates = @("All") + includeDevices = @("All") IncludeGroups = @("Group 01") IncludeLocations = "AllTrusted" IncludePlatforms = @("Android", "IOS") @@ -331,8 +331,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ExcludeLocations = "9e4ca5f3-0ba9-4257-b906-74d3038ac970" } Devices = @{ - IncludeDeviceStates = @("All") - ExcludeDeviceStates = @("Compliant", "DomainJoined") + includeDevices = @("All") + excludeDevices = @("Compliant", "DomainJoined") } ClientAppTypes = @("Browser", "MobileAppsAndDesktopClients") SignInRiskLevels = @("High") @@ -409,7 +409,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "Allin" Ensure = "Absent" ExcludeApplications = @("00000012-0000-0000-c000-000000000000", "Office365") - ExcludeDeviceStates = @("Compliant", "DomainJoined") + excludeDevices = @("Compliant", "DomainJoined") ExcludeGroups = @("Group 01") ExcludeLocations = "Contoso LAN" ExcludePlatforms = @("Windows", "WindowsPhone", "MacOS") @@ -419,7 +419,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { GrantControlOperator = "AND" Id = "bcc0cf19-ee89-46f0-8e12-4b89123ee6f9" IncludeApplications = @("All") - IncludeDeviceStates = @("All") + includeDevices = @("All") IncludeGroups = @("Group 01") IncludeLocations = "AllTrusted" IncludePlatforms = @("Android", "IOS") @@ -464,8 +464,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ExcludeLocations = "9e4ca5f3-0ba9-4257-b906-74d3038ac970" } Devices = @{ - IncludeDeviceStates = @("All") - ExcludeDeviceStates = @("Compliant", "DomainJoined") + includeDevices = @("All") + excludeDevices = @("Compliant", "DomainJoined") } ClientAppTypes = @("Browser", "MobileAppsAndDesktopClients") SignInRiskLevels = @("High") @@ -569,8 +569,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { ExcludeLocations = "9e4ca5f3-0ba9-4257-b906-74d3038ac970" } Devices = @{ - IncludeDeviceStates = @("All") - ExcludeDeviceStates = @("Compliant", "DomainJoined") + includeDevices = @("All") + excludeDevices = @("Compliant", "DomainJoined") } ClientAppTypes = @("Browser", "MobileAppsAndDesktopClients") SignInRiskLevels = @("High") From 3cbf8dcfa38cee8e7c1b7fdd179274b431b14ea1 Mon Sep 17 00:00:00 2001 From: timsto <34174209+Timsto@users.noreply.github.com> Date: Tue, 2 Mar 2021 23:47:28 +0100 Subject: [PATCH 05/10] Update 1-ConfigureAADConditionalAccessPolicy.ps1 --- .../1-ConfigureAADConditionalAccessPolicy.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Microsoft365DSC/Examples/Resources/AADConditionalAccessPolicy/1-ConfigureAADConditionalAccessPolicy.ps1 b/Modules/Microsoft365DSC/Examples/Resources/AADConditionalAccessPolicy/1-ConfigureAADConditionalAccessPolicy.ps1 index f06120a7cd..682b437072 100644 --- a/Modules/Microsoft365DSC/Examples/Resources/AADConditionalAccessPolicy/1-ConfigureAADConditionalAccessPolicy.ps1 +++ b/Modules/Microsoft365DSC/Examples/Resources/AADConditionalAccessPolicy/1-ConfigureAADConditionalAccessPolicy.ps1 @@ -24,14 +24,14 @@ Configuration Example DisplayName = "Allin-example"; Ensure = "Present"; ExcludeApplications = @("803ee9ca-3f7f-4824-bd6e-0b99d720c35c", "00000012-0000-0000-c000-000000000000", "00000007-0000-0000-c000-000000000000", "Office365"); - ExcludeDevice = @("Compliant", "DomainJoined"); + ExcludeDevices = @("Compliant", "DomainJoined"); ExcludeLocations = @("Blocked Countries"); ExcludePlatforms = @("Windows", "WindowsPhone", "MacOS"); ExcludeRoles = @("Company Administrator", "Application Administrator", "Application Developer", "Cloud Application Administrator", "Cloud Device Administrator"); ExcludeUsers = @("admin@contoso.com", "AAdmin@contoso.com", "CAAdmin@contoso.com", "AllanD@contoso.com", "AlexW@contoso.com", "GuestsOrExternalUsers"); GrantControlOperator = "OR"; IncludeApplications = @("All"); - IncludeDevice = @("All"); + IncludeDevices = @("All"); IncludeLocations = @("AllTrusted"); IncludePlatforms = @("Android", "IOS"); IncludeUserActions = @(); From 6154108556815dc69291b28f015570d6a56bc04e Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 2 Apr 2021 09:23:21 -0400 Subject: [PATCH 06/10] EXO Fixes --- CHANGELOG.md | 6 +++ .../MSFT_EXOAcceptedDomain.psm1 | 41 +++---------------- .../MSFT_EXOAddressBookPolicy.psm1 | 19 +++++---- .../MSFT_EXOAddressList.psm1 | 5 +++ .../MSFT_EXOAntiPhishPolicy.psm1 | 5 +++ .../MSFT_EXOAntiPhishRule.psm1 | 5 +++ .../MSFT_EXOApplicationAccessPolicy.psm1 | 20 +++++---- .../MSFT_EXOAtpPolicyForO365.psm1 | 33 ++++++++------- .../MSFT_EXOAvailabilityAddressSpace.psm1 | 5 +++ .../MSFT_EXOAvailabilityConfig.psm1 | 18 ++++---- .../MSFT_EXOCASMailboxPlan.psm1 | 19 +++++---- .../MSFT_EXOClientAccessRule.psm1 | 5 +++ .../MSFT_EXODkimSigningConfig.psm1 | 17 +++++--- .../MSFT_EXOEmailAddressPolicy.psm1 | 16 ++++---- .../MSFT_EXOGlobalAddressList.psm1 | 33 ++++----------- .../MSFT_EXOHostedConnectionFilterPolicy.psm1 | 23 +++++++---- .../MSFT_EXOHostedContentFilterPolicy.psm1 | 5 +++ .../MSFT_EXOHostedContentFilterRule.psm1 | 5 +++ ...SFT_EXOHostedOutboundSpamFilterPolicy.psm1 | 5 +++ .../MSFT_EXOInboundConnector.psm1 | 5 +++ .../MSFT_EXOIntraOrganizationConnector.psm1 | 17 +++++--- .../MSFT_EXOMailTips/MSFT_EXOMailTips.psm1 | 17 ++++---- .../MSFT_EXOMailboxSettings.psm1 | 23 ++++++----- .../MSFT_EXOMalwareFilterPolicy.psm1 | 5 +++ .../MSFT_EXOMalwareFilterRule.psm1 | 5 +++ .../MSFT_EXOManagementRole.psm1 | 28 ++++++------- .../MSFT_EXOMobileDeviceMailboxPolicy.psm1 | 5 +++ .../MSFT_EXOOfflineAddressBook.psm1 | 19 +++++---- .../MSFT_EXOOnPremisesOrganization.psm1 | 19 ++++----- .../MSFT_EXOOrganizationConfig.psm1 | 5 +++ .../MSFT_EXOOrganizationRelationship.psm1 | 30 ++++---------- .../MSFT_EXOOutboundConnector.psm1 | 5 +++ .../MSFT_EXOOwaMailboxPolicy.psm1 | 5 +++ .../MSFT_EXOPartnerApplication.psm1 | 5 +++ .../MSFT_EXOPolicyTipConfig.psm1 | 13 ++++-- .../MSFT_EXORemoteDomain.psm1 | 7 +++- .../MSFT_EXORoleAssignmentPolicy.psm1 | 17 +++++--- .../MSFT_EXOSafeAttachmentPolicy.psm1 | 23 +++++++---- .../MSFT_EXOSafeAttachmentRule.psm1 | 5 +++ .../MSFT_EXOSafeLinksPolicy.psm1 | 5 +++ .../MSFT_EXOSafeLinksRule.psm1 | 5 +++ .../MSFT_EXOSharedMailbox.psm1 | 23 ++++++----- .../MSFT_EXOSharingPolicy.psm1 | 17 +++++--- 43 files changed, 345 insertions(+), 248 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef08b93419..08abf91b54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change log for Microsoft365DSC +# UNRELEASED + +* MISC + * Fixed issue in most EXO resources where AzureAD App information + was not returned by the Get-TargetResource function; + 1.21.331.1 * AADApplication diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 index 9ac1cfd7b3..a56bd4ad23 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAcceptedDomain/MSFT_EXOAcceptedDomain.psm1 @@ -10,7 +10,7 @@ function Get-TargetResource $Identity, [Parameter()] - [ValidateSet('Authoritative','InternalRelay')] + [ValidateSet('Authoritative', 'InternalRelay')] [System.String] $DomainType = 'Authoritative', @@ -90,36 +90,7 @@ function Get-TargetResource if ($null -eq $AcceptedDomain) { Write-Verbose -Message "AcceptedDomain configuration for $($Identity) does not exist." - - # Check to see if $Identity matches a verified domain in the O365 Tenant - $ConnectionMode = New-M365DSCConnection -Platform 'AzureAd' ` - -InboundParameters $PSBoundParameters - - $VerifiedDomains = Get-AzureADDomain | Where-Object -FilterScript { $_.IsVerified } - $MatchingVerifiedDomain = $VerifiedDomains | Where-Object -FilterScript { $_.Name -eq $Identity } - - if ($null -ne $MatchingVerifiedDomain) - { - Write-Verbose -Message "A verified domain matching $($Identity) does not exist in this O365 Tenant." - $nullReturn = @{ - DomainType = $DomainType - Ensure = $Ensure - GlobalAdminAccount = $GlobalAdminAccount - Identity = $Identity - MatchSubDomains = $MatchSubDomains - OutboundOnly = $OutboundOnly - } - <# - if AcceptedDomain does not exist and does not match a verified domain, return submitted parameters for ReverseDSC. - This also prevents Set-TargetResource from running when current state could not be determined - #> - return $nullReturn - } - else - { - # if AcceptedDomain does not exist for a verfied domain, return 'Absent' with submitted parameters to Test-TargetResource. - return $nullReturn - } + return $nullReturn } else { @@ -178,7 +149,7 @@ function Set-TargetResource $Identity, [Parameter()] - [ValidateSet('Authoritative','InternalRelay')] + [ValidateSet('Authoritative', 'InternalRelay')] [System.String] $DomainType = 'Authoritative', @@ -260,7 +231,7 @@ function Test-TargetResource $Identity, [Parameter()] - [ValidateSet('Authoritative','InternalRelay')] + [ValidateSet('Authoritative', 'InternalRelay')] [System.String] $DomainType = 'Authoritative', @@ -388,11 +359,11 @@ function Export-TargetResource } else { - Write-Host "`r`n" -NoNewLine + Write-Host "`r`n" -NoNewline } foreach ($domain in $AllAcceptedDomains) { - Write-Host " |---[$i/$($AllAcceptedDomains.Count)] $($domain.Identity)" -NoNewLine + Write-Host " |---[$i/$($AllAcceptedDomains.Count)] $($domain.Identity)" -NoNewline $Params = @{ Identity = $domain.Identity diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 index 960ef48285..51621715e3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 @@ -93,13 +93,18 @@ function Get-TargetResource else { $result = @{ - Name = $AddressBookPolicy.Name - AddressLists = $AddressBookPolicy.AddressLists - GlobalAddressList = $AddressBookPolicy.GlobalAddressList - OfflineAddressBook = $AddressBookPolicy.OfflineAddressBook - RoomList = $AddressBookPolicy.RoomList - Ensure = 'Present' - GlobalAdminAccount = $GlobalAdminAccount + Name = $AddressBookPolicy.Name + AddressLists = $AddressBookPolicy.AddressLists + GlobalAddressList = $AddressBookPolicy.GlobalAddressList + OfflineAddressBook = $AddressBookPolicy.OfflineAddressBook + RoomList = $AddressBookPolicy.RoomList + Ensure = 'Present' + GlobalAdminAccount = $GlobalAdmin + AccountApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Address Book Policy $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 index d776d9748b..3746b7e1fb 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressList/MSFT_EXOAddressList.psm1 @@ -190,6 +190,11 @@ function Get-TargetResource RecipientFilter = $AddressList.RecipientFilter Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found AddressList $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 index dae871b827..b0657c9544 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishPolicy/MSFT_EXOAntiPhishPolicy.psm1 @@ -231,6 +231,11 @@ function Get-TargetResource TargetedUsersToProtect = $AntiPhishPolicy.TargetedUsersToProtect GlobalAdminAccount = $GlobalAdminAccount Ensure = 'Present' + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found AntiPhishPolicy $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishRule/MSFT_EXOAntiPhishRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishRule/MSFT_EXOAntiPhishRule.psm1 index a266aa9c15..e893b017bc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishRule/MSFT_EXOAntiPhishRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAntiPhishRule/MSFT_EXOAntiPhishRule.psm1 @@ -141,6 +141,11 @@ function Get-TargetResource SentToMemberOf = $AntiPhishRule.SentToMemberOf Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } if ('Enabled' -eq $AntiPhishRule.State) { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOApplicationAccessPolicy/MSFT_EXOApplicationAccessPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOApplicationAccessPolicy/MSFT_EXOApplicationAccessPolicy.psm1 index 51790cfda9..134f2d85aa 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOApplicationAccessPolicy/MSFT_EXOApplicationAccessPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOApplicationAccessPolicy/MSFT_EXOApplicationAccessPolicy.psm1 @@ -96,7 +96,6 @@ function Get-TargetResource } } - $ApplicationAccessPolicy = $AllApplicationAccessPolicies | Where-Object -FilterScript { $_.Identity -eq $Identity } if ($null -eq $ApplicationAccessPolicy) @@ -107,13 +106,18 @@ function Get-TargetResource else { $result = @{ - Identity = $ApplicationAccessPolicy.Identity - AccessRight = $ApplicationAccessPolicy.AccessRight - AppID = $ApplicationAccessPolicy.AppID - PolicyScopeGroupId = $ApplicationAccessPolicy.ScopeIdentity - Description = $ApplicationAccessPolicy.Description - Ensure = 'Present' - GlobalAdminAccount = $GlobalAdminAccount + Identity = $ApplicationAccessPolicy.Identity + AccessRight = $ApplicationAccessPolicy.AccessRight + AppID = $ApplicationAccessPolicy.AppID + PolicyScopeGroupId = $ApplicationAccessPolicy.ScopeIdentity + Description = $ApplicationAccessPolicy.Description + Ensure = 'Present' + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Application Access Policy $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAtpPolicyForO365/MSFT_EXOAtpPolicyForO365.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAtpPolicyForO365/MSFT_EXOAtpPolicyForO365.psm1 index daf8bc1669..f7db9f280a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAtpPolicyForO365/MSFT_EXOAtpPolicyForO365.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAtpPolicyForO365/MSFT_EXOAtpPolicyForO365.psm1 @@ -27,7 +27,7 @@ function Get-TargetResource [Parameter()] [Boolean] - $EnableSafeDocs = $false, + $EnableSafeDocs = $false, [Parameter()] [Boolean] @@ -105,15 +105,20 @@ function Get-TargetResource else { $result = @{ - IsSingleInstance = "Yes" - Identity = $AtpPolicyForO365.Identity - AllowClickThrough = $AtpPolicyForO365.AllowClickThrough - BlockUrls = $AtpPolicyForO365.BlockUrls - EnableATPForSPOTeamsODB = $AtpPolicyForO365.EnableATPForSPOTeamsODB - EnableSafeDocs = $AtpPolicyForO365.EnableSafeDocs - EnableSafeLinksForO365Clients = $AtpPolicyForO365.EnableSafeLinksForO365Clients - TrackClicks = $AtpPolicyForO365.TrackClicks - Ensure = 'Present' + IsSingleInstance = "Yes" + Identity = $AtpPolicyForO365.Identity + AllowClickThrough = $AtpPolicyForO365.AllowClickThrough + BlockUrls = $AtpPolicyForO365.BlockUrls + EnableATPForSPOTeamsODB = $AtpPolicyForO365.EnableATPForSPOTeamsODB + EnableSafeDocs = $AtpPolicyForO365.EnableSafeDocs + EnableSafeLinksForO365Clients = $AtpPolicyForO365.EnableSafeLinksForO365Clients + TrackClicks = $AtpPolicyForO365.TrackClicks + Ensure = 'Present' + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found AtpPolicyForO365 $($Identity)" @@ -175,7 +180,7 @@ function Set-TargetResource [Parameter()] [Boolean] - $EnableSafeDocs = $false, + $EnableSafeDocs = $false, [Parameter()] [Boolean] @@ -271,7 +276,7 @@ function Test-TargetResource [Parameter()] [Boolean] - $EnableSafeDocs = $false, + $EnableSafeDocs = $false, [Parameter()] [Boolean] @@ -398,7 +403,7 @@ function Export-TargetResource } else { - Write-Host "`r`n" -NoNewLine + Write-Host "`r`n" -NoNewline } $i = 1 foreach ($atpPolicy in $ATPPolicies) @@ -413,7 +418,7 @@ function Export-TargetResource CertificatePassword = $CertificatePassword CertificatePath = $CertificatePath } - Write-Host " |---[$i/$($ATPPolicies.Length)] $($atpPolicy.Identiy)" -NoNewLine + Write-Host " |---[$i/$($ATPPolicies.Length)] $($atpPolicy.Identiy)" -NoNewline $Results = Get-TargetResource @Params if ($Results.Ensure -eq "Present") { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 index 9b087ec14e..f8d541162f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityAddressSpace/MSFT_EXOAvailabilityAddressSpace.psm1 @@ -119,6 +119,11 @@ function Get-TargetResource TargetAutodiscoverEpr = $TargetAutodiscoverEpr GlobalAdminAccount = $GlobalAdminAccount Ensure = 'Present' + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found AvailabilityAddressSpace $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 index 9c41b3487e..6f153a63ca 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAvailabilityConfig/MSFT_EXOAvailabilityConfig.psm1 @@ -60,11 +60,8 @@ function Get-TargetResource $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` -InboundParameters $PSBoundParameters } - $nullReturn = @{ - OrgWideAccount = $OrgWideAccount - Ensure = 'Absent' - GlobalAdminAccount = $GlobalAdminAccount - } + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = "Absent" try { @@ -84,9 +81,14 @@ function Get-TargetResource else { $result = @{ - OrgWideAccount = $AvailabilityConfig.OrgWideAccount - Ensure = 'Present' - GlobalAdminAccount = $GlobalAdminAccount + OrgWideAccount = $AvailabilityConfig.OrgWideAccount + Ensure = 'Present' + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Availability Config for $($OrgWideAccount)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxPlan/MSFT_EXOCASMailboxPlan.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxPlan/MSFT_EXOCASMailboxPlan.psm1 index 3e367ae2ef..04810b2ba0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxPlan/MSFT_EXOCASMailboxPlan.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCASMailboxPlan/MSFT_EXOCASMailboxPlan.psm1 @@ -99,13 +99,18 @@ function Get-TargetResource else { $result = @{ - Ensure = 'Present' - Identity = $Identity - ActiveSyncEnabled = $CASMailboxPlan.ActiveSyncEnabled - ImapEnabled = $CASMailboxPlan.ImapEnabled - OwaMailboxPolicy = $CASMailboxPlan.OwaMailboxPolicy - PopEnabled = $CASMailboxPlan.PopEnabled - GlobalAdminAccount = $GlobalAdminAccount + Ensure = 'Present' + Identity = $Identity + ActiveSyncEnabled = $CASMailboxPlan.ActiveSyncEnabled + ImapEnabled = $CASMailboxPlan.ImapEnabled + OwaMailboxPolicy = $CASMailboxPlan.OwaMailboxPolicy + PopEnabled = $CASMailboxPlan.PopEnabled + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found CASMailboxPlan $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOClientAccessRule/MSFT_EXOClientAccessRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOClientAccessRule/MSFT_EXOClientAccessRule.psm1 index eda9caf5d3..9772a6d1d5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOClientAccessRule/MSFT_EXOClientAccessRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOClientAccessRule/MSFT_EXOClientAccessRule.psm1 @@ -140,6 +140,11 @@ function Get-TargetResource UsernameMatchesAnyOfPatterns = $ClientAccessRule.UsernameMatchesAnyOfPatterns Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } if (-not [System.String]::IsNullOrEmpty($ClientAccessRule.RuleScope)) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODkimSigningConfig/MSFT_EXODkimSigningConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODkimSigningConfig/MSFT_EXODkimSigningConfig.psm1 index ec46a93315..68dcc9de49 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXODkimSigningConfig/MSFT_EXODkimSigningConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXODkimSigningConfig/MSFT_EXODkimSigningConfig.psm1 @@ -87,23 +87,23 @@ function Get-TargetResource Write-Verbose -Message "Global ExchangeOnlineSession status:" Write-Verbose -Message "$( Get-PSSession -ErrorAction SilentlyContinue | Where-Object -FilterScript { $_.Name -eq 'ExchangeOnline' } | Out-String)" + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = "Absent" try { $DkimSigningConfigs = Get-DkimSigningConfig } catch { - Close-SessionsAndReturnError -ExceptionMessage $_.Exception $Message = "Error calling {Get-DkimSigningConfig}" New-M365DSCLogEntry -Error $_ -Message $Message -Source $MyInvocation.MyCommand.ModuleName + return $nullReturn } $DkimSigningConfig = $DkimSigningConfigs | Where-Object -FilterScript { $_.Identity -eq $Identity } if (-not $DkimSigningConfig) { Write-Verbose -Message "DkimSigningConfig $($Identity) does not exist." - $result = $PSBoundParameters - $result.Ensure = 'Absent' - return $result + return $nullReturn } else { @@ -116,6 +116,11 @@ function Get-TargetResource HeaderCanonicalization = $DkimSigningConfig.HeaderCanonicalization KeySize = 1024 GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found DkimSigningConfig $($Identity)" @@ -380,12 +385,12 @@ function Export-TargetResource } else { - Write-Host "`r`n" -NoNewLine + Write-Host "`r`n" -NoNewline } $dscContent = "" foreach ($DkimSigningConfig in $DkimSigningConfigs) { - Write-Host " |---[$i/$($DkimSigningConfigs.Length)] $($DkimSigningConfig.Identity)" -NoNewLine + Write-Host " |---[$i/$($DkimSigningConfigs.Length)] $($DkimSigningConfig.Identity)" -NoNewline $Params = @{ Identity = $DkimSigningConfig.Identity GlobalAdminAccount = $GlobalAdminAccount diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailAddressPolicy/MSFT_EXOEmailAddressPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailAddressPolicy/MSFT_EXOEmailAddressPolicy.psm1 index 5f790c5602..146b1bc5ca 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailAddressPolicy/MSFT_EXOEmailAddressPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOEmailAddressPolicy/MSFT_EXOEmailAddressPolicy.psm1 @@ -78,15 +78,8 @@ function Get-TargetResource -InboundParameters $PSBoundParameters } - $nullReturn = @{ - Name = $Name - Priority = $Priority - EnabledEmailAddressTemplates = $EnabledEmailAddressTemplates - EnabledPrimarySMTPAddressTemplate = $EnabledPrimarySMTPAddressTemplate - ManagedByFilter = $ManagedByFilter - Ensure = 'Absent' - GlobalAdminAccount = $GlobalAdminAccount - } + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = "Absent" try { @@ -109,6 +102,11 @@ function Get-TargetResource ManagedByFilter = $EmailAddressPolicy.ManagedByFilter Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Email Address Policy $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 index d94f14c3cd..0a44c1a6c1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOGlobalAddressList/MSFT_EXOGlobalAddressList.psm1 @@ -134,31 +134,9 @@ function Get-TargetResource $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` -InboundParameters $PSBoundParameters - $nullReturn = @{ - Name = $Name - ConditionalCompany = $ConditionalCompany - ConditionalCustomAttribute1 = $ConditionalCustomAttribute1 - ConditionalCustomAttribute10 = $ConditionalCustomAttribute10 - ConditionalCustomAttribute11 = $ConditionalCustomAttribute11 - ConditionalCustomAttribute12 = $ConditionalCustomAttribute12 - ConditionalCustomAttribute13 = $ConditionalCustomAttribute13 - ConditionalCustomAttribute14 = $ConditionalCustomAttribute14 - ConditionalCustomAttribute15 = $ConditionalCustomAttribute15 - ConditionalCustomAttribute2 = $ConditionalCustomAttribute2 - ConditionalCustomAttribute3 = $ConditionalCustomAttribute3 - ConditionalCustomAttribute4 = $ConditionalCustomAttribute4 - ConditionalCustomAttribute5 = $ConditionalCustomAttribute5 - ConditionalCustomAttribute6 = $ConditionalCustomAttribute6 - ConditionalCustomAttribute7 = $ConditionalCustomAttribute7 - ConditionalCustomAttribute8 = $ConditionalCustomAttribute8 - ConditionalCustomAttribute9 = $ConditionalCustomAttribute9 - ConditionalDepartment = $ConditionalDepartment - ConditionalStateOrProvince = $ConditionalStateOrProvince - IncludedRecipients = $IncludedRecipients - RecipientFilter = $RecipientFilter - Ensure = 'Absent' - GlobalAdminAccount = $GlobalAdminAccount - } + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = "Absent" + if ($null -eq (Get-Command 'Get-GlobalAddressList' -ErrorAction SilentlyContinue)) { return $nullReturn @@ -210,6 +188,11 @@ function Get-TargetResource RecipientFilter = $GlobalAddressList.RecipientFilter Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Global Address List $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 index b94755517d..1f93cd80df 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedConnectionFilterPolicy/MSFT_EXOHostedConnectionFilterPolicy.psm1 @@ -94,9 +94,9 @@ function Get-TargetResource } catch { - Close-SessionsAndReturnError -ExceptionMessage $_.Exception $Message = "Error calling {Get-HostedConnectionFilterPolicy}" New-M365DSCLogEntry -Error $_ -Message $Message -Source $MyInvocation.MyCommand.ModuleName + return $nullReturn } $HostedConnectionFilterPolicy = $HostedConnectionFilterPolicys | Where-Object -FilterScript { $_. Identity -eq $Identity } @@ -108,14 +108,19 @@ function Get-TargetResource else { $result = @{ - Ensure = 'Present' - Identity = $Identity - AdminDisplayName = $HostedConnectionFilterPolicy.AdminDisplayName - EnableSafeList = $HostedConnectionFilterPolicy.EnableSafeList - IPAllowList = $HostedConnectionFilterPolicy.IPAllowList - IPBlockList = $HostedConnectionFilterPolicy.IPBlockList - MakeDefault = $false - GlobalAdminAccount = $GlobalAdminAccount + Ensure = 'Present' + Identity = $Identity + AdminDisplayName = $HostedConnectionFilterPolicy.AdminDisplayName + EnableSafeList = $HostedConnectionFilterPolicy.EnableSafeList + IPAllowList = $HostedConnectionFilterPolicy.IPAllowList + IPBlockList = $HostedConnectionFilterPolicy.IPBlockList + MakeDefault = $false + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } if ($AntiPhishRule.IsDefault) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 index c9fe2d5e1b..48748ba8a0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterPolicy/MSFT_EXOHostedContentFilterPolicy.psm1 @@ -338,6 +338,11 @@ function Get-TargetResource PhishZapEnabled = $HostedContentFilterPolicy.PhishZapEnabled SpamZapEnabled = $HostedContentFilterPolicy.SpamZapEnabled GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } if ($HostedContentFilterPolicy.IsDefault) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 index dfe71edc7d..4e0d112b8d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedContentFilterRule/MSFT_EXOHostedContentFilterRule.psm1 @@ -137,6 +137,11 @@ function Get-TargetResource SentTo = $HostedContentFilterRule.SentTo SentToMemberOf = $HostedContentFilterRule.SentToMemberOf GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } if ('Enabled' -eq $HostedContentFilterRule.State) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedOutboundSpamFilterPolicy/MSFT_EXOHostedOutboundSpamFilterPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedOutboundSpamFilterPolicy/MSFT_EXOHostedOutboundSpamFilterPolicy.psm1 index faa620bfe8..290b537a1d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedOutboundSpamFilterPolicy/MSFT_EXOHostedOutboundSpamFilterPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOHostedOutboundSpamFilterPolicy/MSFT_EXOHostedOutboundSpamFilterPolicy.psm1 @@ -103,6 +103,11 @@ function Get-TargetResource NotifyOutboundSpamRecipients = $HostedOutboundSpamFilterPolicy.NotifyOutboundSpamRecipients NotifyOutboundSpam = $HostedOutboundSpamFilterPolicy.NotifyOutboundSpam GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found HostedOutboundSpamFilterPolicy $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOInboundConnector/MSFT_EXOInboundConnector.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOInboundConnector/MSFT_EXOInboundConnector.psm1 index d3001e141c..04cc3b2d39 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOInboundConnector/MSFT_EXOInboundConnector.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOInboundConnector/MSFT_EXOInboundConnector.psm1 @@ -151,6 +151,11 @@ function Get-TargetResource TreatMessagesAsInternal = $InboundConnector.TreatMessagesAsInternal GlobalAdminAccount = $GlobalAdminAccount Ensure = 'Present' + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found InboundConnector $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 index e65f79ba48..1c0ea4feea 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOIntraOrganizationConnector/MSFT_EXOIntraOrganizationConnector.psm1 @@ -87,12 +87,17 @@ function Get-TargetResource else { $result = @{ - Identity = $Identity - DiscoveryEndpoint = $IntraOrganizationConnector.DiscoveryEndpoint.ToString() - Enabled = $IntraOrganizationConnector.Enabled - TargetAddressDomains = $IntraOrganizationConnector.TargetAddressDomains - GlobalAdminAccount = $GlobalAdminAccount - Ensure = 'Present' + Identity = $Identity + DiscoveryEndpoint = $IntraOrganizationConnector.DiscoveryEndpoint.ToString() + Enabled = $IntraOrganizationConnector.Enabled + TargetAddressDomains = $IntraOrganizationConnector.TargetAddressDomains + GlobalAdminAccount = $GlobalAdminAccount + Ensure = 'Present' + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found IntraOrganizationConnector $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailTips/MSFT_EXOMailTips.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailTips/MSFT_EXOMailTips.psm1 index 84a64e35c3..97756c1d90 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailTips/MSFT_EXOMailTips.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailTips/MSFT_EXOMailTips.psm1 @@ -69,16 +69,8 @@ function Get-TargetResource Add-M365DSCTelemetryEvent -Data $data #endregion - $nullReturn = @{ - Organization = $Organization - MailTipsAllTipsEnabled = $null - MailTipsGroupMetricsEnabled = $null - MailTipsLargeAudienceThreshold = $null - MailTipsMailboxSourcedTipsEnabled = $null - MailTipsExternalRecipientsTipsEnabled = $null - Ensure = "Absent" - GlobalAdminAccount = $null - } + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = "Absent" if ($Global:CurrentModeIsExport) { @@ -111,6 +103,11 @@ function Get-TargetResource MailTipsExternalRecipientsTipsEnabled = $OrgConfig.MailTipsExternalRecipientsTipsEnabled Ensure = "Present" GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found configuration of the Mailtips for $($Organization)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxSettings/MSFT_EXOMailboxSettings.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxSettings/MSFT_EXOMailboxSettings.psm1 index e6f8f8bc6a..6f296788ca 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxSettings/MSFT_EXOMailboxSettings.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMailboxSettings/MSFT_EXOMailboxSettings.psm1 @@ -57,12 +57,8 @@ function Get-TargetResource Add-M365DSCTelemetryEvent -Data $data #endregion - $nullReturn = @{ - DisplayName = $DisplayName - TimeZone = $null - Locale = $null - Ensure = "Absent" - } + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = "Absent" if ($Global:CurrentModeIsExport) { @@ -92,11 +88,16 @@ function Get-TargetResource } $result = @{ - DisplayName = $DisplayName - TimeZone = $mailboxSettings.TimeZone - Locale = $mailboxSettings.Language.Name - Ensure = "Present" - GlobalAdminAccount = $GlobalAdminAccount + DisplayName = $DisplayName + TimeZone = $mailboxSettings.TimeZone + Locale = $mailboxSettings.Language.Name + Ensure = "Present" + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found an existing instance of Mailbox '$($DisplayName)'" return $result diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterPolicy/MSFT_EXOMalwareFilterPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterPolicy/MSFT_EXOMalwareFilterPolicy.psm1 index 9b1cbdab5d..66ee1996af 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterPolicy/MSFT_EXOMalwareFilterPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterPolicy/MSFT_EXOMalwareFilterPolicy.psm1 @@ -189,6 +189,11 @@ function Get-TargetResource ZapEnabled = $MalwareFilterPolicy.ZapEnabled GlobalAdminAccount = $GlobalAdminAccount Ensure = 'Present' + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found MalwareFilterPolicy $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 index 29eb543ace..086ceeb3a3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMalwareFilterRule/MSFT_EXOMalwareFilterRule.psm1 @@ -129,6 +129,11 @@ function Get-TargetResource SentToMemberOf = $MalwareFilterRule.SentToMemberOf GlobalAdminAccount = $GlobalAdminAccount Ensure = 'Present' + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found MalwareFilterRule $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRole/MSFT_EXOManagementRole.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRole/MSFT_EXOManagementRole.psm1 index 19d869270e..cf28e3e043 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRole/MSFT_EXOManagementRole.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOManagementRole/MSFT_EXOManagementRole.psm1 @@ -69,13 +69,9 @@ function Get-TargetResource $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` -InboundParameters $PSBoundParameters } - $nullReturn = @{ - Name = $Name - Parent = $Parent - Description = $Description - Ensure = 'Absent' - GlobalAdminAccount = $GlobalAdminAccount - } + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = "Absent" + try { $AllManagementRoles = Get-ManagementRole -ErrorAction Stop @@ -85,19 +81,21 @@ function Get-TargetResource if ($null -eq $ManagementRole) { Write-Verbose -Message "Management Role $($Name) does not exist." - - - return $nullReturn } else { $result = @{ - Name = $ManagementRole.Name - Parent = $ManagementRole.Parent - Description = $ManagementRole.Description - Ensure = 'Present' - GlobalAdminAccount = $GlobalAdminAccount + Name = $ManagementRole.Name + Parent = $ManagementRole.Parent + Description = $ManagementRole.Description + Ensure = 'Present' + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Management Role $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMobileDeviceMailboxPolicy/MSFT_EXOMobileDeviceMailboxPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMobileDeviceMailboxPolicy/MSFT_EXOMobileDeviceMailboxPolicy.psm1 index feb8110f61..6ef962021f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMobileDeviceMailboxPolicy/MSFT_EXOMobileDeviceMailboxPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOMobileDeviceMailboxPolicy/MSFT_EXOMobileDeviceMailboxPolicy.psm1 @@ -357,6 +357,11 @@ function Get-TargetResource WSSAccessEnabled = $MobileDeviceMailboxPolicy.WSSAccessEnabled Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Mobile Device Mailbox Policy $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOfflineAddressBook/MSFT_EXOOfflineAddressBook.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOfflineAddressBook/MSFT_EXOOfflineAddressBook.psm1 index 1cac7d18d8..ee95b7856a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOfflineAddressBook/MSFT_EXOOfflineAddressBook.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOfflineAddressBook/MSFT_EXOOfflineAddressBook.psm1 @@ -99,13 +99,18 @@ function Get-TargetResource else { $result = @{ - Name = $OfflineAddressBook.Name - AddressLists = $OfflineAddressBook.AddressLists - ConfiguredAttributes = $OfflineAddressBook.ConfiguredAttributes - DiffRetentionPeriod = $OfflineAddressBook.DiffRetentionPeriod - IsDefault = $OfflineAddressBook.IsDefault - Ensure = 'Present' - GlobalAdminAccount = $GlobalAdminAccount + Name = $OfflineAddressBook.Name + AddressLists = $OfflineAddressBook.AddressLists + ConfiguredAttributes = $OfflineAddressBook.ConfiguredAttributes + DiffRetentionPeriod = $OfflineAddressBook.DiffRetentionPeriod + IsDefault = $OfflineAddressBook.IsDefault + Ensure = 'Present' + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Offline Address Book $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 index bf62cbc12b..c89391d604 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOnPremisesOrganization/MSFT_EXOOnPremisesOrganization.psm1 @@ -88,18 +88,8 @@ function Get-TargetResource $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` -InboundParameters $PSBoundParameters } - $nullReturn = @{ - Identity = $Identity - Comment = $Comment - HybridDomains = $HybridDomains - InboundConnector = $InboundConnector - OrganizationName = $OrganizationName - OrganizationGuid = $OrganizationGuid - OrganizationRelationship = $OrganizationRelationship - OutboundConnector = $OutboundConnector - Ensure = 'Absent' - GlobalAdminAccount = $GlobalAdminAccount - } + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = "Absent" try { @@ -125,6 +115,11 @@ function Get-TargetResource OutboundConnector = $OnPremisesOrganization.OutboundConnector Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found On-premises Organization $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationConfig/MSFT_EXOOrganizationConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationConfig/MSFT_EXOOrganizationConfig.psm1 index 72155f5b65..0396899382 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationConfig/MSFT_EXOOrganizationConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationConfig/MSFT_EXOOrganizationConfig.psm1 @@ -392,6 +392,11 @@ function Get-TargetResource WebPushNotificationsDisabled = $ConfigSettings.WebPushNotificationsDisabled WebSuggestedRepliesDisabled = $ConfigSettings.WebSuggestedRepliesDisabled GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } if ($null -eq $ConfigSettings.AutoExpandingArchive) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationRelationship/MSFT_EXOOrganizationRelationship.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationRelationship/MSFT_EXOOrganizationRelationship.psm1 index 38b3fb46d4..ec80359017 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationRelationship/MSFT_EXOOrganizationRelationship.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOrganizationRelationship/MSFT_EXOOrganizationRelationship.psm1 @@ -131,28 +131,9 @@ function Get-TargetResource $ConnectionMode = New-M365DSCConnection -Platform 'ExchangeOnline' ` -InboundParameters $PSBoundParameters } - $nullReturn = @{ - ArchiveAccessEnabled = $ArchiveAccessEnabled - DeliveryReportEnabled = $DeliveryReportEnabled - DomainNames = $DomainNames - Enabled = $Enabled - FreeBusyAccessEnabled = $FreeBusyAccessEnabled - FreeBusyAccessLevel = $FreeBusyAccessLevel - FreeBusyAccessScope = $FreeBusyAccessScope - MailboxMoveEnabled = $MailboxMoveEnabled - MailTipsAccessEnabled = $MailTipsAccessEnabled - MailTipsAccessLevel = $MailTipsAccessLevel - MailTipsAccessScope = $MailTipsAccessScope - Name = $Name - OrganizationContact = $OrganizationContact - PhotosEnabled = $PhotosEnabled - TargetApplicationUri = $TargetApplicationUri - TargetAutodiscoverEpr = $TargetAutodiscoverEpr - TargetOwaURL = $TargetOwaURL - TargetSharingEpr = $TargetSharingEpr - Ensure = 'Absent' - GlobalAdminAccount = $GlobalAdminAccount - } + $nullReturn = $nullReturn + $nullReturn.Ensure = "Absent" + try { $AllOrganizationRelationships = Get-OrganizationRelationship -ErrorAction Stop @@ -183,6 +164,11 @@ function Get-TargetResource PhotosEnabled = $OrganizationRelationship.PhotosEnabled Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } if ($OrganizationRelationship.TargetApplicationUri) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOutboundConnector/MSFT_EXOOutboundConnector.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOutboundConnector/MSFT_EXOOutboundConnector.psm1 index 511b83ffe0..9e8a43f0ed 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOutboundConnector/MSFT_EXOOutboundConnector.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOutboundConnector/MSFT_EXOOutboundConnector.psm1 @@ -163,6 +163,11 @@ function Get-TargetResource ValidationRecipients = $OutBoundConnector.ValidationRecipients GlobalAdminAccount = $GlobalAdminAccount Ensure = 'Present' + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found OutBoundConnector $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOwaMailboxPolicy/MSFT_EXOOwaMailboxPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOwaMailboxPolicy/MSFT_EXOOwaMailboxPolicy.psm1 index a759d30b6d..db088e8df0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOwaMailboxPolicy/MSFT_EXOOwaMailboxPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOOwaMailboxPolicy/MSFT_EXOOwaMailboxPolicy.psm1 @@ -460,6 +460,11 @@ function Get-TargetResource WebPartsFrameOptionsType = $OwaMailboxPolicy.WebPartsFrameOptionsType Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found OWA Mailbox Policy $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 index 1f19726e71..b08586ef7d 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPartnerApplication/MSFT_EXOPartnerApplication.psm1 @@ -106,6 +106,11 @@ function Get-TargetResource LinkedAccount = $PartnerApplication.LinkedAccount Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Partner Application $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPolicyTipConfig/MSFT_EXOPolicyTipConfig.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPolicyTipConfig/MSFT_EXOPolicyTipConfig.psm1 index 8fcc6b377d..8df764cfa5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPolicyTipConfig/MSFT_EXOPolicyTipConfig.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOPolicyTipConfig/MSFT_EXOPolicyTipConfig.psm1 @@ -89,10 +89,15 @@ function Get-TargetResource else { $result = @{ - Name = $PolicyTipConfig.Name - Value = $PolicyTipConfig.Value - Ensure = 'Present' - GlobalAdminAccount = $GlobalAdminAccount + Name = $PolicyTipConfig.Name + Value = $PolicyTipConfig.Value + Ensure = 'Present' + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Policy Tip Config $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORemoteDomain/MSFT_EXORemoteDomain.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORemoteDomain/MSFT_EXORemoteDomain.psm1 index 66e47c0f37..9105fecade 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORemoteDomain/MSFT_EXORemoteDomain.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORemoteDomain/MSFT_EXORemoteDomain.psm1 @@ -189,9 +189,14 @@ function Get-TargetResource TrustedMailOutboundEnabled = $RemoteDomain.TrustedMailOutboundEnabled UseSimpleDisplayName = $RemoteDomain.UseSimpleDisplayName GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } - Write-Verbose -Message "Found RemoteDomain configuration for $($Identity)" + Write-Verbose -Message "Found RemoteDomain configuration for $Identity" return $result } } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleAssignmentPolicy/MSFT_EXORoleAssignmentPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleAssignmentPolicy/MSFT_EXORoleAssignmentPolicy.psm1 index 33afbdf857..90840bbb07 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleAssignmentPolicy/MSFT_EXORoleAssignmentPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXORoleAssignmentPolicy/MSFT_EXORoleAssignmentPolicy.psm1 @@ -91,12 +91,17 @@ function Get-TargetResource else { $result = @{ - Name = $RoleAssignmentPolicy.Name - Description = $RoleAssignmentPolicy.Description - IsDefault = $RoleAssignmentPolicy.IsDefault - Roles = $RoleAssignmentPolicy.AssignedRoles - Ensure = 'Present' - GlobalAdminAccount = $GlobalAdminAccount + Name = $RoleAssignmentPolicy.Name + Description = $RoleAssignmentPolicy.Description + IsDefault = $RoleAssignmentPolicy.IsDefault + Roles = $RoleAssignmentPolicy.AssignedRoles + Ensure = 'Present' + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Role Assignment Policy $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentPolicy/MSFT_EXOSafeAttachmentPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentPolicy/MSFT_EXOSafeAttachmentPolicy.psm1 index abd6bfb540..5ba8f16eb1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentPolicy/MSFT_EXOSafeAttachmentPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentPolicy/MSFT_EXOSafeAttachmentPolicy.psm1 @@ -101,15 +101,20 @@ function Get-TargetResource else { $result = @{ - Ensure = 'Present' - Identity = $Identity - Action = $SafeAttachmentPolicy.Action - ActionOnError = $SafeAttachmentPolicy.ActionOnError - AdminDisplayName = $SafeAttachmentPolicy.AdminDisplayName - Enable = $SafeAttachmentPolicy.Enable - Redirect = $SafeAttachmentPolicy.Redirect - RedirectAddress = $SafeAttachmentPolicy.RedirectAddress - GlobalAdminAccount = $GlobalAdminAccount + Ensure = 'Present' + Identity = $Identity + Action = $SafeAttachmentPolicy.Action + ActionOnError = $SafeAttachmentPolicy.ActionOnError + AdminDisplayName = $SafeAttachmentPolicy.AdminDisplayName + Enable = $SafeAttachmentPolicy.Enable + Redirect = $SafeAttachmentPolicy.Redirect + RedirectAddress = $SafeAttachmentPolicy.RedirectAddress + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found SafeAttachmentPolicy $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentRule/MSFT_EXOSafeAttachmentRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentRule/MSFT_EXOSafeAttachmentRule.psm1 index 9847d99201..edb6be95aa 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentRule/MSFT_EXOSafeAttachmentRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeAttachmentRule/MSFT_EXOSafeAttachmentRule.psm1 @@ -141,6 +141,11 @@ function Get-TargetResource SentTo = $SafeAttachmentRule.SentTo SentToMemberOf = $SafeAttachmentRule.SentToMemberOf GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } if ('Enabled' -eq $SafeAttachmentRule.State) { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 index 383bfbbfc3..43fe074d15 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksPolicy/MSFT_EXOSafeLinksPolicy.psm1 @@ -136,6 +136,11 @@ function Get-TargetResource ScanUrls = $SafeLinksPolicy.ScanUrls Ensure = 'Present' GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found SafeLinksPolicy $($Identity)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksRule/MSFT_EXOSafeLinksRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksRule/MSFT_EXOSafeLinksRule.psm1 index 5cfe424eed..315dc3a84f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksRule/MSFT_EXOSafeLinksRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSafeLinksRule/MSFT_EXOSafeLinksRule.psm1 @@ -128,6 +128,11 @@ function Get-TargetResource SentToMemberOf = $SafeLinksRule.SentToMemberOf GlobalAdminAccount = $GlobalAdminAccount Ensure = 'Present' + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } if ('Enabled' -eq $SafeLinksRule.State) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharedMailbox/MSFT_EXOSharedMailbox.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharedMailbox/MSFT_EXOSharedMailbox.psm1 index 8e17037008..f184911e22 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharedMailbox/MSFT_EXOSharedMailbox.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharedMailbox/MSFT_EXOSharedMailbox.psm1 @@ -57,12 +57,8 @@ function Get-TargetResource Add-M365DSCTelemetryEvent -Data $data #endregion - $nullReturn = @{ - DisplayName = $DisplayName - PrimarySMTPAddress = $null - GlobalAdminAccount = $null - Ensure = "Absent" - } + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = "Absent" if ($Global:CurrentModeIsExport) { @@ -104,11 +100,16 @@ function Get-TargetResource #endregion $result = @{ - DisplayName = $DisplayName - PrimarySMTPAddress = $mailbox.PrimarySMTPAddress.ToString() - Aliases = $CurrentAliases - Ensure = "Present" - GlobalAdminAccount = $GlobalAdminAccount + DisplayName = $DisplayName + PrimarySMTPAddress = $mailbox.PrimarySMTPAddress.ToString() + Aliases = $CurrentAliases + Ensure = "Present" + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found an existing instance of Shared Mailbox '$($DisplayName)'" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharingPolicy/MSFT_EXOSharingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharingPolicy/MSFT_EXOSharingPolicy.psm1 index 6e8ebc757b..4fb449d0df 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharingPolicy/MSFT_EXOSharingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOSharingPolicy/MSFT_EXOSharingPolicy.psm1 @@ -90,12 +90,17 @@ function Get-TargetResource else { $result = @{ - Name = $SharingPolicy.Name - Default = $SharingPolicy.Default - Domains = $SharingPolicy.Domains - Enabled = $SharingPolicy.Enabled - Ensure = 'Present' - GlobalAdminAccount = $GlobalAdminAccount + Name = $SharingPolicy.Name + Default = $SharingPolicy.Default + Domains = $SharingPolicy.Domains + Enabled = $SharingPolicy.Enabled + Ensure = 'Present' + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + TenantId = $TenantId } Write-Verbose -Message "Found Sharing Policy $($Name)" From 319131bac32eb942303c4a7901f8a36eb121e778 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Fri, 2 Apr 2021 12:50:59 -0400 Subject: [PATCH 07/10] Fixes related to code review --- .../MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 | 4 ++-- Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 index 51621715e3..a89666d242 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOAddressBookPolicy/MSFT_EXOAddressBookPolicy.psm1 @@ -99,8 +99,8 @@ function Get-TargetResource OfflineAddressBook = $AddressBookPolicy.OfflineAddressBook RoomList = $AddressBookPolicy.RoomList Ensure = 'Present' - GlobalAdminAccount = $GlobalAdmin - AccountApplicationId = $ApplicationId + GlobalAdminAccount = $GlobalAdminAccount + ApplicationId = $ApplicationId CertificateThumbprint = $CertificateThumbprint CertificatePath = $CertificatePath CertificatePassword = $CertificatePassword diff --git a/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 index 8d27a6a7ec..4388804520 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCUtil.psm1 @@ -465,7 +465,10 @@ function Test-M365DSCParameterState } $KeyList | ForEach-Object -Process { - if (($_ -ne "Verbose") -and ($_ -ne "InstallAccount")) + if (($_ -ne "Verbose") -and ($_ -ne "GlobalAdminAccount") ` + -and ($_ -ne "ApplicationId") -and ($_ -ne "CertificateThumbprint") ` + -and ($_ -ne "CertificatePath") -and ($_ -ne "CertificatePassword") ` + -and ($_ -ne "TenantId")) { if (($CurrentValues.ContainsKey($_) -eq $false) ` -or ($CurrentValues.$_ -ne $DesiredValues.$_) ` From ea13cf98c3b4c9edac87feba72de401c4cd9b08a Mon Sep 17 00:00:00 2001 From: Swampen Date: Tue, 6 Apr 2021 22:55:46 +0200 Subject: [PATCH 08/10] Added check for AllowCloudRecording --- .../MSFT_TeamsMeetingPolicy/MSFT_TeamsMeetingPolicy.psm1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingPolicy/MSFT_TeamsMeetingPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingPolicy/MSFT_TeamsMeetingPolicy.psm1 index b493f89d95..945ec22e9b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingPolicy/MSFT_TeamsMeetingPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_TeamsMeetingPolicy/MSFT_TeamsMeetingPolicy.psm1 @@ -531,6 +531,11 @@ function Set-TargetResource { $SetParameters.Remove("AllowAnonymousUsersToDialOut") | Out-Null } + if ($SetParameters.AllowCloudRecording -eq $false ) + { + $SetParameters.Remove("RecordingStorageMode") + $SetParameters.Remove("AllowRecordingStorageOutsideRegion") + } Set-CsTeamsMeetingPolicy @SetParameters } elseif ($Ensure -eq 'Absent' -and $CurrentValues.Ensure -eq 'Present') From 3b66c448a3ccd4a66d6f03c2f85945bf73c0da4f Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Wed, 7 Apr 2021 16:23:30 -0400 Subject: [PATCH 09/10] Update MSFT_AADMSGroup.psm1 --- .../DSCResources/MSFT_AADMSGroup/MSFT_AADMSGroup.psm1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_AADMSGroup/MSFT_AADMSGroup.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_AADMSGroup/MSFT_AADMSGroup.psm1 index a710a333aa..ce597a6c1f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_AADMSGroup/MSFT_AADMSGroup.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_AADMSGroup/MSFT_AADMSGroup.psm1 @@ -97,6 +97,7 @@ function Get-TargetResource } catch { + Write-Verbose -Message "Couldn't get group by ID, trying by name" $Group = Get-AzureADMSGroup -Filter "DisplayName eq '$DisplayName'" -ErrorAction Stop if ($Group.Length -gt 1) { @@ -117,6 +118,7 @@ function Get-TargetResource if ($null -eq $Group) { + Write-Verbose -Message "Group was null, returning null" return $nullReturn } else @@ -294,13 +296,15 @@ function Set-TargetResource } elseif ($Ensure -eq 'Present' -and $currentGroup.Ensure -eq 'Absent') { - $currentParameters.Remove("Id") + Write-Verbose -Message "Creating new group {$DisplayName}" + $currentParameters.Remove("Id") | Out-Null try { New-AzureADMSGroup @currentParameters } catch { + Write-Verbose -Message $_ New-M365DSCLogEntry -Error $_ -Message "Couldn't create group $DisplayName" -Source $MyInvocation.MyCommand.ModuleName } } From aa121ad16197e3ebf24ca47babf845db44877bf5 Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Wed, 7 Apr 2021 16:28:05 -0400 Subject: [PATCH 10/10] Release 1.21.407.1 --- CHANGELOG.md | 8 ++++- Modules/Microsoft365DSC/Microsoft365DSC.psd1 | 32 ++++++-------------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08abf91b54..171eca62af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,13 @@ # Change log for Microsoft365DSC -# UNRELEASED +# 1.21.407.1 +* AADConditionalAccessPolicy + * BREAKING: Renamed the 'includeDeviceStates' and 'excludeDeviceStates' + parameters to 'includeDevices' and 'excludeDevices'; +* TeamsMeetingPolicy + * The Set-CsTeamsMeetingPolicy would fail if recording settings are + changed while the AllowCloudRecording is set to false; * MISC * Fixed issue in most EXO resources where AzureAD App information was not returned by the Get-TargetResource function; diff --git a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 index 627f238d44..4bad325bd0 100644 --- a/Modules/Microsoft365DSC/Microsoft365DSC.psd1 +++ b/Modules/Microsoft365DSC/Microsoft365DSC.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 2021-03-31 +# Generated on: 2021-04-07 @{ @@ -11,7 +11,7 @@ # RootModule = '' # Version number of this module. - ModuleVersion = '1.21.331.1' + ModuleVersion = '1.21.407.1' # Supported PSEditions # CompatiblePSEditions = @() @@ -176,27 +176,15 @@ IconUri = 'https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/Dependencies/Images/Logo.png?raw=true' # ReleaseNotes of this module - ReleaseNotes = "* AADApplication - * Added support for API Permissions; - * EXOSharedMailbox - * Improved how we are retrieving all shared mailboxes in the - Export-TargetResource function. - * ODSettings - * Fixed and issue with ExcludedFileExtensions; - * SCDLPComplianceRule - * Fixed issue where only the first SIT Action was exported; - * SPOSiteDesign - * Added support for GrouplessTeamSite web template. - * SPOSiteScript - * Fixed issue where an existin site script could not be updated. - * Made parameter GlobalAdminAccount in Get-TargetResource - optional. - * SPOTheme - * Fixed issue where removal of a theme would throw an error. - * Corrected variable name to properly show the theme name in verbose message - when removing a theme. + ReleaseNotes = "* AADConditionalAccessPolicy + * BREAKING: Renamed the 'includeDeviceStates' and 'excludeDeviceStates' + parameters to 'includeDevices' and 'excludeDevices'; + * TeamsMeetingPolicy + * The Set-CsTeamsMeetingPolicy would fail if recording settings are + changed while the AllowCloudRecording is set to false; * MISC - * Fixed issue with ODSettings and ExcludedFileExtensions" + * Fixed issue in most EXO resources where AzureAD App information + was not returned by the Get-TargetResource function;" # Flag to indicate whether the module requires explicit user acceptance for install/update # RequireLicenseAcceptance = $false