Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois committed Dec 22, 2021
1 parent 9e65b2f commit 61c6ba8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
3 changes: 3 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

* EXOAntiPhishPolicy
* Deprecated the EnableAntispoofEnforcement and TargetDomainProtectionAction parameters;
FIXES #1018
* EXOHostedCOntentFilterPolicy
* Fix for the MakeDefault property where it wasn't properly setting existing
policies to default.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function Get-TargetResource
[System.Boolean]
$Enabled = $true,

# Deprecated
[Parameter()]
[System.Boolean]
$EnableAntispoofEnforcement = $true,
Expand Down Expand Up @@ -113,6 +114,7 @@ function Get-TargetResource
[System.String[]]
$TargetedDomainActionRecipients = @(),

# Deprecated
[Parameter()]
[ValidateSet('BccMessage', 'Delete', 'MoveToJmf', 'NoAction', 'Quarantine', 'Redirect')]
[System.String]
Expand Down Expand Up @@ -218,7 +220,6 @@ function Get-TargetResource
AuthenticationFailAction = $AntiPhishPolicy.AuthenticationFailAction
Enabled = $AntiPhishPolicy.Enabled
EnableFirstContactSafetyTips = $AntiPhishPolicy.EnableFirstContactSafetyTips
EnableAntispoofEnforcement = $AntiPhishPolicy.EnableAntispoofEnforcement
EnableMailboxIntelligence = $AntiPhishPolicy.EnableMailboxIntelligence
EnableMailboxIntelligenceProtection = $AntiPhishPolicy.EnableMailboxIntelligenceProtection
EnableOrganizationDomainsProtection = $AntiPhishPolicy.EnableOrganizationDomainsProtection
Expand All @@ -238,7 +239,6 @@ function Get-TargetResource
MakeDefault = $AntiPhishPolicy.IsDefault
PhishThresholdLevel = $PhishThresholdLevelValue
TargetedDomainActionRecipients = $AntiPhishPolicy.TargetedDomainActionRecipients
TargetedDomainProtectionAction = $AntiPhishPolicy.TargetedDomainProtectionAction
TargetedDomainsToProtect = $AntiPhishPolicy.TargetedDomainsToProtect
TargetedUserActionRecipients = $AntiPhishPolicy.TargetedUserActionRecipients
TargetedUserProtectionAction = $TargetedUserProtectionActionValue
Expand Down Expand Up @@ -305,6 +305,7 @@ function Set-TargetResource
[System.Boolean]
$Enabled = $true,

# Deprecated
[Parameter()]
[System.Boolean]
$EnableAntispoofEnforcement = $true,
Expand Down Expand Up @@ -397,6 +398,7 @@ function Set-TargetResource
[System.String[]]
$TargetedDomainActionRecipients = @(),

# Deprecated
[Parameter()]
[ValidateSet('BccMessage', 'Delete', 'MoveToJmf', 'NoAction', 'Quarantine', 'Redirect')]
[System.String]
Expand Down Expand Up @@ -444,6 +446,18 @@ function Set-TargetResource
$CertificatePassword
)

if ($EnableAntispoofEnforcement)
{
Write-Verbose -Message "The EnableAntispoofEnforcement parameter is now deprecated." + `
" It will be removed in the next major release. Please update your configuraton."
}

if ($TargetedDomainProtectionAction)
{
Write-Verbose -Message "The TargetedDomainProtectionAction parameter is now deprecated." + `
" It will be removed in the next major release. Please update your configuraton."
}

Write-Verbose -Message "Setting configuration of AntiPhishPolicy for $Identity"

#Ensure the proper dependencies are installed in the current environment.
Expand Down Expand Up @@ -516,6 +530,7 @@ function Test-TargetResource
[System.Boolean]
$Enabled = $true,

# Deprecated
[Parameter()]
[System.Boolean]
$EnableAntispoofEnforcement = $true,
Expand Down Expand Up @@ -608,6 +623,7 @@ function Test-TargetResource
[System.String[]]
$TargetedDomainActionRecipients = @(),

# Deprecated
[Parameter()]
[ValidateSet('BccMessage', 'Delete', 'MoveToJmf', 'NoAction', 'Quarantine', 'Redirect')]
[System.String]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,22 @@ Configuration Example
MakeDefault = $null
PhishThresholdLevel = 1
EnableTargetedDomainsProtection = $null
TreatSoftPassAsAuthenticated = $True
Enabled = $null
TargetedDomainsToProtect = $null
EnableSimilarUsersSafetyTips = $null
ExcludedDomains = $null
EnableAuthenticationSafetyTip = $False
TargetedDomainActionRecipients = $null
EnableMailboxIntelligence = $null
EnableSimilarDomainsSafetyTips = $null
TargetedDomainProtectionAction = "NoAction"
AdminDisplayName = ""
AuthenticationFailAction = "MoveToJmf"
TargetedUserProtectionAction = "NoAction"
TargetedUsersToProtect = $null
EnableTargetedUserProtection = $null
ExcludedSenders = $null
EnableAuthenticationSoftPassSafetyTip = $False
EnableOrganizationDomainsProtection = $null
EnableUnusualCharactersSafetyTips = $null
TargetedUserActionRecipients = $null
EnableAntispoofEnforcement = $True
Ensure = "Present"
Credential = $credsGlobalAdmin
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
AdminDisplayName = 'DSC Test Policy'
Enabled = $true
EnableFirstContactSafetyTips = $false
EnableAntispoofEnforcement = $true
EnableMailboxIntelligence = $true
EnableOrganizationDomainsProtection = $false
EnableSimilarDomainsSafetyTips = $false
Expand All @@ -123,7 +122,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
EnableViaTag = $false
MakeDefault = $false
AuthenticationFailAction = 'Quarantine'
TargetedDomainProtectionAction = 'BccMessage'
TargetedDomainActionRecipients = @('[email protected]', '[email protected]')
TargetedUserProtectionAction = 'BccMessage'
TargetedUserActionRecipients = @('[email protected]', '[email protected]')
Expand All @@ -139,7 +137,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
AdminDisplayName = 'DSC Test Policy'
Enabled = $true
EnableFirstContactSafetyTips = $false
EnableAntispoofEnforcement = $true
EnableAuthenticationSafetyTip = $true
EnableMailboxIntelligence = $true
EnableOrganizationDomainsProtection = $false
Expand All @@ -152,7 +149,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
IsDefault = $false
TreatSoftPassAsAuthenticated = $true
AuthenticationFailAction = 'Quarantine'
TargetedDomainProtectionAction = 'BccMessage'
TargetedDomainActionRecipients = @('[email protected]', '[email protected]')
TargetedUserProtectionAction = 'BccMessage'
TargetedUserActionRecipients = @('[email protected]', '[email protected]')
Expand All @@ -177,7 +173,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
AdminDisplayName = 'DSC Test Policy'
Enabled = $true
EnableFirstContactSafetyTips = $false
EnableAntispoofEnforcement = $true
EnableMailboxIntelligence = $true
EnableOrganizationDomainsProtection = $false
EnableSimilarDomainsSafetyTips = $false
Expand All @@ -188,7 +183,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
EnableViaTag = $false
MakeDefault = $false
AuthenticationFailAction = 'Quarantine'
TargetedDomainProtectionAction = 'BccMessage'
TargetedDomainActionRecipients = @('[email protected]', '[email protected]')
TargetedUserProtectionAction = 'BccMessage'
TargetedUserActionRecipients = @('[email protected]', '[email protected]')
Expand All @@ -203,7 +197,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
AdminDisplayName = 'DSC Test Policy'
Enabled = $false
EnableFirstContactSafetyTips = $true
EnableAntispoofEnforcement = $false
EnableMailboxIntelligence = $false
EnableOrganizationDomainsProtection = $true
EnableSimilarDomainsSafetyTips = $true
Expand All @@ -214,7 +207,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
EnableViaTag = $true
MakeDefault = $true
AuthenticationFailAction = 'MoveToJmf'
TargetedDomainProtectionAction = 'NoAction'
TargetedDomainActionRecipients = @()
TargetedUserProtectionAction = 'NoAction'
TargetedUserActionRecipients = @()
Expand Down

0 comments on commit 61c6ba8

Please sign in to comment.