----NOTE: Work in Progress----
Adding Email Notification Settings
Let's also add some email notification settings:
$poShMonConfiguration = New-PoShMonConfiguration {
General -MinutesToScanHistory 30 -ServerNames 'Server1','Server2'
OperatingSystem -EventLogCodes 'Error','Warning' -WindowsServices 'BITS'
Notifications {
Email -ToAddress "me@company.com" -FromAddress "monitoring@company.com" -SmtpServer "smtp.company.com" -Port 1234
}
}
Invoke-OSMonitoring -PoShMonConfiguration $poShMonConfiguration -Verbose