Skip to content

Commit

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

# 1.21.1222.1

* EXOHostedCOntentFilterPolicy
* Fix for the MakeDefault property where it wasn't properly setting existing
policies to default.
FIXES #1635
* SPOUserProfileProperty
* Removed the Required key from the schema.mof file for Credential;
ISSUE #1632
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ function Get-TargetResource
IncreaseScoreWithNumericIps = $HostedContentFilterPolicy.IncreaseScoreWithNumericIps
IncreaseScoreWithRedirectToOtherPort = $HostedContentFilterPolicy.IncreaseScoreWithRedirectToOtherPort
LanguageBlockList = $HostedContentFilterPolicy.LanguageBlockList
MakeDefault = $false
MakeDefault = $HostedContentFilterPolicy.IsDefault
MarkAsSpamBulkMail = $HostedContentFilterPolicy.MarkAsSpamBulkMail
MarkAsSpamEmbedTagsInHtml = $HostedContentFilterPolicy.MarkAsSpamEmbedTagsInHtml
MarkAsSpamEmptyMessages = $HostedContentFilterPolicy.MarkAsSpamEmptyMessages
Expand Down Expand Up @@ -698,14 +698,20 @@ function Set-TargetResource
Name = $HostedContentFilterPolicyParams.Identity
}
$HostedContentFilterPolicyParams.Remove('Identity') | Out-Null
Write-Verbose -Message "Creating HostedContentFilterPolicy $($Identity)."
Write-Verbose -Message "Creating HostedContentFilterPolicy $($Identity) with values: $(Convert-M365DscHashtableToString -Hashtable $HostedContentFilterPolicyParams)"
New-HostedContentFilterPolicy @HostedContentFilterPolicyParams
if ($PSBoundParameters.MakeDefault)
{
Write-Verbose -Message "Updating Policy as default"
Set-HostedContentFilterPolicy @HostedContentFilterPolicyParams -MakeDefault -Confirm:$false
}
}
elseif (('Present' -eq $Ensure ) -and ($null -ne $HostedContentFilterPolicy))
{
Write-Verbose -Message "Setting HostedContentFilterPolicy $($Identity) with values: $(Convert-M365DscHashtableToString -Hashtable $HostedContentFilterPolicyParams)."
if ($PSBoundParameters.MakeDefault)
{
Write-Verbose -Message "Updating Policy as default"
Set-HostedContentFilterPolicy @HostedContentFilterPolicyParams -MakeDefault -Confirm:$false
}
else
Expand Down

0 comments on commit f05c1a7

Please sign in to comment.