Skip to content

Commit

Permalink
Merge branch 'Dev' into feat/intune-offline-filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois authored Jul 4, 2024
2 parents d5a7eca + 1ffc9e3 commit 30f97b4
Show file tree
Hide file tree
Showing 38 changed files with 2,658 additions and 1,167 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,45 @@

# UNRELEASED

* EXOCASMailboxPlan
* Remove `DisplayName` from set parameters
FIXES [#4814](https://github.com/microsoft/Microsoft365DSC/issues/4814)
* EXODkimSigningConfig
* Add support for 2048 key size;
* Remove authentication parameters before changing the resources
FIXES [#4821](https://github.com/microsoft/Microsoft365DSC/issues/4821)
FIXES [#4805](https://github.com/microsoft/Microsoft365DSC/issues/4805)
* EXOGroupSettings
* Export unlimited number of groups
FIXES [#4800](https://github.com/microsoft/Microsoft365DSC/issues/4800)
* EXOHostedContentFilterRule
* When updating the resource assign property `Identity` to the correct value
FIXES [#4836](https://github.com/microsoft/Microsoft365DSC/issues/4836)
* EXOMailboxPlan
* Remove `DisplayName` from set parameters
FIXES [#4817](https://github.com/microsoft/Microsoft365DSC/issues/4817)
* EXOHostedOutboundSpamFilterRule
* Fix `if` clause on update scenario, remove property `Enabled` from being set
while updating the resource and ensure that also while updating the resource
the property `HostedOutboundSpamFilterPolicy` is only sent if it differs
from what the resource already has currently assigned
FIXES [#4838](https://github.com/microsoft/Microsoft365DSC/issues/4838)
* IntuneExploitProtectionPolicyWindows10SettingCatalog
* Migrate to new settings catalog cmdlets.
* IntuneSettingCatalogASRRulesPolicyWindows10
* Migrate to new settings catalog cmdlets.
* TeamsFederationConfiguration
* Add missing property `ExternalAccessWithTrialTenants`
FIXES [#4829](https://github.com/microsoft/Microsoft365DSC/issues/4829)
* M365DSCDRGUtil
* Added Microsoft Graph filter functions.
* Force array as parameter in `Compare-M365DSCIntunePolicyAssignment`.
* MISC
* Added support for `startswith`, `endswith` and `contains` filter methods to Intune resources
that did not support it previously.
FIXES [#4597](https://github.com/microsoft/Microsoft365DSC/issues/4597)
* Fixes issues with values of type `groupSettingCollection` and `choiceSetting`
when creating the settings catalog policy settings body.
* DEPENDENCIES
* Updated DSCParser to version 2.0.0.6

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,24 +237,16 @@ function Set-TargetResource
$ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' `
-InboundParameters $PSBoundParameters

$CASMailboxPlanParams = [System.Collections.Hashtable]($PSBoundParameters)
$CASMailboxPlanParams.Remove('Ensure') | Out-Null
$CASMailboxPlanParams.Remove('Credential') | Out-Null
$CASMailboxPlanParams.Remove('ApplicationId') | Out-Null
$CASMailboxPlanParams.Remove('TenantId') | Out-Null
$CASMailboxPlanParams.Remove('CertificateThumbprint') | Out-Null
$CASMailboxPlanParams.Remove('CertificatePath') | Out-Null
$CASMailboxPlanParams.Remove('CertificatePassword') | Out-Null
$CASMailboxPlanParams.Remove('ManagedIdentity') | Out-Null
$CASMailboxPlanParams.Remove('AccessTokens') | Out-Null
$PSBoundParameters = Remove-M365DSCAuthenticationParameter -BoundParameters $PSBoundParameters
$PSBoundParameters.Remove('DisplayName') | Out-Null

$CASMailboxPlan = Get-CASMailboxPlan -Filter "Name -like '$($Identity.Split('-')[0])-*'"

if ($null -ne $CASMailboxPlan)
{
$CasMailboxPlanParams.Identity = $CASMailboxPlan.Identity
Write-Verbose -Message "Setting CASMailboxPlan $Identity with values: $(Convert-M365DscHashtableToString -Hashtable $CASMailboxPlanParams)"
Set-CASMailboxPlan @CASMailboxPlanParams
$PSBoundParameters.Identity = $CASMailboxPlan.Identity
Write-Verbose -Message "Setting CASMailboxPlan $Identity with values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)"
Set-CASMailboxPlan @PSBoundParameters
}
else
{
Expand Down Expand Up @@ -344,13 +336,12 @@ function Test-TargetResource
Write-Verbose -Message "Testing configuration of CASMailboxPlan for $Identity"

$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).Clone()
$ValuesToCheck = Remove-M365DSCAuthenticationParameter -BoundParameters $ValuesToCheck

Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)"
Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)"

$ValuesToCheck = $PSBoundParameters
$ValuesToCheck.Remove('Ensure') | Out-Null

$TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues `
-Source $($MyInvocation.MyCommand.Source) `
-DesiredValues $PSBoundParameters `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ function Get-TargetResource
$HeaderCanonicalization = 'Relaxed',

[Parameter()]
[ValidateSet(1024)]
[ValidateSet(1024, 2048)]
[uint16]
$KeySize = 1024,
$KeySize,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -126,7 +126,7 @@ function Get-TargetResource
BodyCanonicalization = $DkimSigningConfig.BodyCanonicalization
Enabled = $DkimSigningConfig.Enabled
HeaderCanonicalization = $DkimSigningConfig.HeaderCanonicalization
KeySize = 1024
KeySize = $DkimSigningConfig.Selector1KeySize
Credential = $Credential
ApplicationId = $ApplicationId
CertificateThumbprint = $CertificateThumbprint
Expand Down Expand Up @@ -176,9 +176,9 @@ function Set-TargetResource
$HeaderCanonicalization = 'Relaxed',

[Parameter()]
[ValidateSet(1024)]
[ValidateSet(1024, 2048)]
[uint16]
$KeySize = 1024,
$KeySize,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down Expand Up @@ -230,37 +230,23 @@ function Set-TargetResource
$ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' `
-InboundParameters $PSBoundParameters

$DkimSigningConfigs = Get-DkimSigningConfig

$DkimSigningConfig = $DkimSigningConfigs | Where-Object -FilterScript { $_.Identity -eq $Identity }
$DkimSigningConfig = Get-TargetResource @PSBoundParameters
$PSBoundParameters = Remove-M365DSCAuthenticationParameter -BoundParameters $PSBoundParameters

if (('Present' -eq $Ensure ) -and ($null -eq $DkimSigningConfig))
{
$DkimSigningConfigParams = [System.Collections.Hashtable]($PSBoundParameters)
$DkimSigningConfigParams.Remove('Ensure') | Out-Null
$DkimSigningConfigParams.Remove('Credential') | Out-Null
$DkimSigningConfigParams.Remove('ApplicationId') | Out-Null
$DkimSigningConfigParams.Remove('TenantId') | Out-Null
$DkimSigningConfigParams.Remove('CertificateThumbprint') | Out-Null
$DkimSigningConfigParams.Remove('CertificatePath') | Out-Null
$DkimSigningConfigParams.Remove('CertificatePassword') | Out-Null
$DkimSigningConfigParams.Remove('ManagedIdentity') | Out-Null
$DkimSigningConfigParams.Remove('AccessTokens') | Out-Null
$DkimSigningConfigParams += @{
$PSBoundParameters += @{
DomainName = $PSBoundParameters.Identity
}
$DkimSigningConfigParams.Remove('Identity') | Out-Null
$PSBoundParameters.Remove('Identity') | Out-Null
Write-Verbose -Message "Creating DkimSigningConfig $($Identity)."
New-DkimSigningConfig @DkimSigningConfigParams
New-DkimSigningConfig @PSBoundParameters
}
elseif (('Present' -eq $Ensure ) -and ($null -ne $DkimSigningConfig))
{
$DkimSigningConfigParams = $PSBoundParameters
$DkimSigningConfigParams.Remove('Ensure') | Out-Null
$DkimSigningConfigParams.Remove('Credential') | Out-Null
$DkimSigningConfigParams.Remove('KeySize') | Out-Null
Write-Verbose -Message "Setting DkimSigningConfig $($Identity) with values: $(Convert-M365DscHashtableToString -Hashtable $DkimSigningConfigParams)"
Set-DkimSigningConfig @DkimSigningConfigParams -Confirm:$false
$PSBoundParameters.Remove('KeySize') | Out-Null
Write-Verbose -Message "Setting DkimSigningConfig $($Identity) with values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)"
Set-DkimSigningConfig @PSBoundParameters -Confirm:$false
}

if (('Absent' -eq $Ensure ) -and ($DkimSigningConfig))
Expand Down Expand Up @@ -304,9 +290,9 @@ function Test-TargetResource
$HeaderCanonicalization = 'Relaxed',

[Parameter()]
[ValidateSet(1024)]
[ValidateSet(1024, 2048)]
[uint16]
$KeySize = 1024,
$KeySize,

[Parameter()]
[System.Management.Automation.PSCredential]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class MSFT_EXODkimSigningConfig : OMI_BaseResource
[Write, Description("The AdminDisplayName parameter specifies a description for the policy.")] String AdminDisplayName;
[Write, Description("The BodyCanonicalization parameter specifies the canonicalization algorithm that's used to create and verify the message body part of the DKIM signature. This value effectively controls the sensitivity of DKIM to changes to the message body in transit. Valid values are 'Simple' or 'Relaxed'. 'Relaxed' is the default."), ValueMap{"Simple","Relaxed"}, Values{"Simple","Relaxed"}] String BodyCanonicalization;
[Write, Description("The HeaderCanonicalization parameter specifies the canonicalization algorithm that's used to create and verify the message header part of the DKIM signature. This value effectively controls the sensitivity of DKIM to changes to the message headers in transit. Valid values are 'Simple' or 'Relaxed'. 'Relaxed' is the default."), ValueMap{"Simple","Relaxed"}, Values{"Simple","Relaxed"}] String HeaderCanonicalization;
[Write, Description("The KeySize parameter specifies the size in bits of the public key that's used in the DKIM signing policy. The only available value is 1024."),ValueMap{"1024"}, Values{"1024"}] Uint16 KeySize;
[Write, Description("The KeySize parameter specifies the size in bits of the public key that's used in the DKIM signing policy. Valid values are 1024 and 2048"),ValueMap{"1024","2048"}, Values{"1024","2048"}] Uint16 KeySize;
[Write, Description("The Enabled parameter specifies whether the DKIM Signing Configuration is enabled or disabled. Default is $true.")] Boolean Enabled;
[Write, Description("Specifies if this Client Access Rule should exist."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
[Write, Description("Credentials of the Exchange Global Admin"), EmbeddedInstance("MSFT_Credential")] string Credential;
Expand Down
Loading

0 comments on commit 30f97b4

Please sign in to comment.