-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration File [Smtp]
Only required if using Smtp as an alert method.
Recipient email address for the alert.
To = alert@domain.comSender's email address for the alert.
From = WebsiteFailedLogins@domain.comEmail subject for the alert. When an alert is generated, the email subject is modified.
Using the Example Value, here is how the email subject will look for each alert.
FailedLoginsPerIP: [FailedLoginsPerIP][1.1.1.1] W3SVC1 Website Failed Logins Alert TotalFailedLogins: [TotalFailedLogins] W3SVC1 Website Failed Logins Alert TerminatingError: [TerminatingError] W3SVC1 Website Failed Logins Alert
Subject = W3SVC1 Website Failed Logins AlertDNS name or IP address of SMTP server.
NOTE: this script is hard-coded to use
TLS1.2when communicating with this server.
Server = smtp.domain.comSMTP server port to connect to.
Port = 25Optional setting. XML file containing PSCredential for SMTP authentication. Leave blank if no credentials are to be used.
To create this file run the following command using the account that will be launching this module.
Get-Credential | Export-Clixml -Path <CredentialXmlPath>Ensure NTFS permissions on the PSCredential xml file are tuned to only allow access to SYSTEM, any backup accounts, and the user running this module. The Export-Clixml cmdlet encrypts credential objects by using the Windows Data Protection API. The encryption ensures that only your user account on only that computer can decrypt the contents of the credential object. The exported CLIXML file can't be used on a different computer or by a different user. For more information: Export-Clixml: Example 3: Encrypt an exported credential object on Windows
To not use smtp credentials, leave this setting blank as shown in the example below.
CredentialXml = D:\Tools\WebsiteFailedLogins-Smtp-Credentials.xmlCredentialXml =