Skip to content

Commit 5f0a032

Browse files
committed
Update Invoke-CIPPStandardSpamFilterPolicy.ps1
1 parent 7918d54 commit 5f0a032

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Modules/CIPPCore/Public/Standards/Invoke-CIPPStandardSpamFilterPolicy.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,7 @@ function Invoke-CIPPStandardSpamFilterPolicy {
241241
if ($StateIsCorrect) {
242242
$FieldValue = $true
243243
} else {
244-
$CurrentState = $CurrentState | Select-Object -Property Name, SpamAction, SpamQuarantineTag, HighConfidenceSpamAction, HighConfidenceSpamQuarantineTag, BulkSpamAction, BulkQuarantineTag, PhishSpamAction, PhishQuarantineTag, HighConfidencePhishAction, HighConfidencePhishQuarantineTag, BulkThreshold, QuarantineRetentionPeriod, IncreaseScoreWithImageLinks, IncreaseScoreWithNumericIps, IncreaseScoreWithRedirectToOtherPort, IncreaseScoreWithBizOrInfoUrls, MarkAsSpamEmptyMessages, MarkAsSpamJavaScriptInHtml, MarkAsSpamFramesInHtml, MarkAsSpamObjectTagsInHtml, MarkAsSpamEmbedTagsInHtml, MarkAsSpamFormTagsInHtml, MarkAsSpamWebBugsInHtml, MarkAsSpamSensitiveWordList, MarkAsSpamSpfRecordHardFail, MarkAsSpamFromAddressAuthFail, MarkAsSpamNdrBackscatter, MarkAsSpamBulkMail, InlineSafetyTipsEnabled, PhishZapEnabled, SpamZapEnabled
245-
246-
$FieldValue = $StateIsCorrect ?? $CurrentState ?? @{ state = 'Spam filter policy not found' }
244+
$FieldValue = $StateIsCorrect -eq $true ? $true : ($CurrentState ?? @{ state = 'Spam filter policy not found' })
247245
}
248246
Set-CIPPStandardsCompareField -FieldName 'standards.SpamFilterPolicy' -FieldValue $FieldValue -Tenant $Tenant
249247
}

0 commit comments

Comments
 (0)