You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Context "Testing failsafe operator exists on <_.Name>" {
104
-
# It "The Failsafe Operator <_.ExpectedFailSafeOperator> exists on <_.Name>" -Skip:$skipFailsafeOperator -ForEach ($PSItem.AlertSystem | Where-Object ExpectedFailSafeOperator -NE 'null') {
105
-
# $PSItem.ExpectedFailSafeOperator | Should -Be $PSItem.ActualFailSafeOperator -Because 'The failsafe operator will ensure that any job failures will be notified to someone if not set explicitly'
106
-
# }
107
-
# }
108
-
#}
97
+
Describe "Database Mail Profile"-Tag DatabaseMailProfile, Agent -ForEach $InstancesToTest {
Context "Testing Database Mail Profile exists on <_.Name>" {
101
+
It "The Database Mail profile <_.DatabaseMailProfile.ExpectedDatabaseMailProfile> exists on <_.Name>"-Skip:$skipDatabaseMailProfile { #-ForEach ($PSItem.DatabaseMailProfile | Where-Object ExpectedDatabaseMailProfile -NE 'null') {
102
+
$PSItem.DatabaseMailProfile.ActualDatabaseMailProfile| Should -Be $PSItem.DatabaseMailProfile.ExpectedDatabaseMailProfile-Because 'The database mail profile is required to send emails'
103
+
}
104
+
}
105
+
}
106
+
109
107
110
108
# Describe "Database Mail Profile" -Tags DatabaseMailProfile, $filename {
Set-PSFConfig-Module dbachecks -Name skip.agent.databasemailprofile -Validation bool -Value $false-Initialize -Description "Skip the Database Mail Profile check"
344
345
Set-PSFConfig-Module dbachecks -Name skip.agent.longrunningjobs -Validation bool -Value $false-Initialize -Description "Skip the long running agent jobs check"
345
346
Set-PSFConfig-Module dbachecks -Name skip.agent.lastjobruntime -Validation bool -Value $false-Initialize -Description "Skip the last agent job time check"
346
347
347
348
349
+
348
350
Set-PSFConfig-Module dbachecks -Name skip.security.containedbautoclose -Validation bool -Value $true-Initialize -Description "Skips the scan for contained databases should have auto close enabled"
349
351
Set-PSFConfig-Module dbachecks -Name skip.security.sqlagentproxiesnopublicrole -Validation bool -Value $true-Initialize -Description "Skips the scan for if the public role has access to SQL Agent proxies"
350
352
Set-PSFConfig-Module dbachecks -Name skip.security.symmetrickeyencryptionlevel -Validation bool -Value $true-Initialize -Description "Skips the test for if the Symmetric Encryption is at least AES_128 or higher in non-system databases"
0 commit comments