Permalink
Browse files

this is easier

  • Loading branch information...
Rob Sewell Rob Sewell
Rob Sewell authored and Rob Sewell committed Feb 7, 2019
1 parent 2be0783 commit 61f4cc6a4711c26bf4434a8d301920effab6bced
Showing with 2 additions and 2 deletions.
  1. +2 −2 internal/configurations/configuration.ps1
@@ -8,7 +8,7 @@ Register-PSFConfigValidation -Name validation.LogFileComparisonValidations -Scri
$EmailValidationSb = {
param ([string]$input)
$EmailRegEx = "^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
if ($input -match $EmailRegEx) {
if (($input -match $EmailRegEx) -or -not ($input) ) {
[PsCustomObject]@{Success = $true; value = $input}
} else {
[PsCustomObject]@{Success = $false; message = "does not appear to be an email address - $input"}
@@ -235,7 +235,7 @@ Set-PSFConfig -Module dbachecks -Name domain.domaincontroller -Value $null -Init

# email
Set-PSFConfig -Module dbachecks -Name mail.failurethreshhold -Value 0 -Initialize -Description "Number of errors that must be present to generate an email report"
Set-PSFConfig -Module dbachecks -Name mail.smtpserver -Value $null -Validation string -Initialize -Description "Store the name of the smtp server to send email reports"
Set-PSFConfig -Module dbachecks -Name mail.smtpserver -Value $null -Initialize -Description "Store the name of the smtp server to send email reports"
Set-PSFConfig -Module dbachecks -Name mail.to -Value $null -Validation validation.EmailValidation -Initialize -Description "Email address to send the report to"
Set-PSFConfig -Module dbachecks -Name mail.from -Value $null -Validation validation.EmailValidation -Initialize -Description "Email address the email reports should come from"
Set-PSFConfig -Module dbachecks -Name mail.subject -Value 'dbachecks results' -Validation String -Initialize -Description "Subject line of the email report"

0 comments on commit 61f4cc6

Please sign in to comment.