Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois committed Dec 21, 2021
1 parent df25463 commit ad9fa40
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# 1.21.1222.1

* AADGroup
* Default to Unified type if no GroupTypes are provided;
FIXES #850
* EXOHostedCOntentFilterPolicy
* Fix for the MakeDefault property where it wasn't properly setting existing
policies to default.
Expand All @@ -12,6 +15,8 @@
* DEPENDENCIES
* Updated all Microsoft.Graph.* dependencies to version 1.9.1;
* MISC
* Fixed issue where running Export-M365DSCConfiguration with the -LaunchWebUI
parameter would prompt for credentials;
* Added warning message when ApplicationSecret is used while attempting
to export resources for Exchange Online;
Fixes #1629
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function Get-TargetResource

[Parameter()]
[System.String[]]
$GroupTypes,
$GroupTypes = @("Unified"),

[Parameter()]
[System.String]
Expand Down Expand Up @@ -285,6 +285,10 @@ function Set-TargetResource
Write-Verbose -Message "Cannot set mailenabled to false if GroupTypes is set to Unified when creating group."
throw "Cannot set mailenabled to false if GroupTypes is set to Unified when creating a group."
}
if (-not $GroupTypes)
{
$currentParameters.Add("GroupTypes", @("Unified"))
}

if ($Ensure -eq 'Present' -and $currentGroup.Ensure -eq 'Present')
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ function Set-TargetResource
$SearchConfigXML.OuterXml | Out-File $tempPath

# Create the Managed Property if it doesn't already exist
Set-PnPSearchConfiguration -Scope Subscription -Path $tempPath
Set-PnPSearchConfiguration -Scope 'Subscription' -Configuration $SearchConfigXML.OuterXml

#region Aliases
if ($null -ne $Aliases)
Expand Down Expand Up @@ -821,13 +821,18 @@ function Test-TargetResource

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

$ValuesToCheck = $PSBoundParameters
$ValuesToCheck.Remove('Credential') | Out-Null
$ValuesToCheck.Remove('ApplicationId') | Out-Null
$ValuesToCheck.Remove('ApplicationSecret') | Out-Null
$ValuesToCheck.Remove('TenantId') | Out-Null
$ValuesToCheck.Remove('CertificateThumbprint') | Out-Null
$ValuesToCheck.Remove('CertificatePath') | Out-Null
$ValuesToCheck.Remove('CertificatePassword') | Out-Null
$TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues `
-Source $($MyInvocation.MyCommand.Source) `
-DesiredValues $PSBoundParameters `
-ValuesToCheck @("Ensure", `
"Name",
"Type")
-ValuesToCheck $ValuesToCheck.Keys

Write-Verbose -Message "Test-TargetResource returned $TestResult"

Expand Down

0 comments on commit ad9fa40

Please sign in to comment.