Skip to content

Commit 1bcfe23

Browse files
add databaseMailEnabled skip config #887
1 parent 6367f4c commit 1bcfe23

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

checks/Agentv5.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ BeforeDiscovery {
3838

3939
Describe "Database Mail XPs" -Tag DatabaseMailEnabled, CIS, security -ForEach $InstancesToTest {
4040
$DatabaseMailEnabled = Get-DbcConfigValue policy.security.DatabaseMailEnabled
41-
$skip = Get-DbcConfigValue skip.instance.databasemailenabled
41+
$skip = Get-DbcConfigValue skip.agent.databasemailenabled
4242
Context "Testing Database Mail XPs on <_.Name>" {
4343
It "Testing Database Mail XPs is set to $DatabaseMailEnabled on <_.Name>" -Skip:$skip {
4444
$PSItem.Configuration.DatabaseMailEnabled | Should -Be $PSItem.ConfigValues.DatabaseMailEnabled -Because 'The Database Mail XPs setting should be set correctly'

internal/configurations/configuration.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Set-PSFConfig -Module dbachecks -Name skip.hadr.listener.tcpport -Validation boo
254254
Set-PSFConfig -Module dbachecks -Name skip.hadr.replica.tcpport -Validation bool -Value $false -Initialize -Description "Skip the HADR Replica TCP port number (If port number is not standard across the entire AG architecture)"
255255
Set-PSFConfig -Module dbachecks -Name skip.hadr.listener.pingcheck -Validation bool -Value $false -Initialize -Description "Skip the HADR listener ping test (especially useful for Azure and AWS)"
256256
Set-PSFConfig -Module dbachecks -Name skip.instance.defaulttrace -Validation bool -Value $false -Initialize -Description "Skip the default trace check"
257+
Set-PSFConfig -Module dbachecks -Name skip.agent.databasemailenabled -Validation bool -Value $false -Initialize -Description "Skip the long Database Mail Enabled agent check"
257258
Set-PSFConfig -Module dbachecks -Name skip.agent.longrunningjobs -Validation bool -Value $false -Initialize -Description "Skip the long running agent jobs check"
258259
Set-PSFConfig -Module dbachecks -Name skip.agent.lastjobruntime -Validation bool -Value $false -Initialize -Description "Skip the last agent job time check"
259260
Set-PSFConfig -Module dbachecks -Name skip.instance.dac -Validation bool -Value $false -Initialize -Description "Skip Dedicated Administrator Connection (DAC) check"

0 commit comments

Comments
 (0)