Skip to content

Commit

Permalink
Fixed Invoke-CIPPStandardAntiPhishPolicy.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
cipptesting committed Jun 25, 2024
1 parent de594e0 commit 8be3108
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function Invoke-CIPPStandardAntiPhishPolicy {

$CurrentState = New-ExoRequest -tenantid $Tenant -cmdlet 'Get-AntiPhishPolicy' |
Where-Object -Property Name -EQ $PolicyName |
Select-Object Name, Enabled, PhishThresholdLevel, EnableMailboxIntelligence, EnableMailboxIntelligenceProtection, EnableSpoofIntelligence, EnableFirstContactSafetyTips, EnableSimilarUsersSafetyTips, EnableSimilarDomainsSafetyTips, EnableUnusualCharactersSafetyTips, EnableUnauthenticatedSender, EnableViaTag, MailboxIntelligenceProtectionAction, MailboxIntelligenceQuarantineTag
Select-Object Name, Enabled, PhishThresholdLevel, EnableMailboxIntelligence, EnableMailboxIntelligenceProtection, EnableSpoofIntelligence, EnableFirstContactSafetyTips, EnableSimilarUsersSafetyTips, EnableSimilarDomainsSafetyTips, EnableUnusualCharactersSafetyTips, EnableUnauthenticatedSender, EnableViaTag, AuthenticationFailAction, SpoofQuarantineTag, MailboxIntelligenceProtectionAction, MailboxIntelligenceQuarantineTag, TargetedUserProtectionAction, TargetedUserQuarantineTag, TargetedDomainProtectionAction, TargetedDomainQuarantineTag, EnableOrganizationDomainsProtection

$StateIsCorrect = ($CurrentState.Name -eq $PolicyName) -and
($CurrentState.Enabled -eq $true) -and
Expand All @@ -23,10 +23,14 @@ function Invoke-CIPPStandardAntiPhishPolicy {
($CurrentState.EnableUnusualCharactersSafetyTips -eq $Settings.EnableUnusualCharactersSafetyTips) -and
($CurrentState.EnableUnauthenticatedSender -eq $true) -and
($CurrentState.EnableViaTag -eq $true) -and
($CurrentState.AuthenticationFailAction -eq $Settings.AuthenticationFailAction) -and
($CurrentState.SpoofQuarantineTag -eq $Settings.SpoofQuarantineTag) -and
($CurrentState.MailboxIntelligenceProtectionAction -eq $Settings.MailboxIntelligenceProtectionAction) -and
($CurrentState.MailboxIntelligenceQuarantineTag -eq $Settings.MailboxIntelligenceQuarantineTag) -and
($CurrentState.TargetedUserProtectionAction -eq $Settings.TargetedUserProtectionAction) -and
($CurrentState.TargetedUserQuarantineTag -eq $Settings.TargetedUserQuarantineTag) -and
($CurrentState.TargetedDomainProtectionAction -eq $Settings.TargetedDomainProtectionAction) -and
($CurrentState.TargetedDomainQuarantineTag -eq $Settings.TargetedDomainQuarantineTag) -and
($CurrentState.EnableOrganizationDomainsProtection -eq $true)

$AcceptedDomains = New-ExoRequest -tenantid $Tenant -cmdlet 'Get-AcceptedDomain'
Expand Down

0 comments on commit 8be3108

Please sign in to comment.