Dell OpenManager Server Administrator (OMSA) Notification Script.
This script updates your Dell OMSA Alert Management settings to call this script when alerts happen performing three actions; sending SMTP email of the alert, logging the alert to the Windows System event logs, and writes a local log file of alerts and errors.
"Forked" from https://github.com/ncouraud/OMSA-Notify "Re-Forked" https://github.com/GMartinez-Sisti/OMSA-Notify
1.0.0
- Copy OMSANotify.ps1 to a folder on the server (Example: C:\Scripts)
- Update the setup variables in the script to match your environment
- $EmailSmtpServer = "smtp.domain.local" #Your SMTP server
- $EmailDomainSender = "domain.local" #The domain portion of your email address
- $EmailTo = "recipient@domain.local" #Email to send to
- $EmailReplyTo = "no-reply@domain.local" #Email to send as
- $LogLocation = "D:\Logs" #Location to store OMSANotify event and error logs
- $EnableExecutionPolicy = $true #Enable usage of setting -ExecutionPolicy RemoteSigned
- From an Admin PowerShell run the script with the setup switch .\OMSANotify.ps1 -Setup (see Note below)
- The script will update each alert type in OMSA to use the OMSANotify.ps1 script
- Check in OMSA to verify the changes were made successfully OMSA -> Alert Management -> All Alerts -> Execute Application = Enabled + Script
NOTE - On Windows 2012, 2012 R2, or 2016 you may have to alter the ExecutionPolicy to get the scripts to run.
- Example - powershell.exe -ExecutionPolicy RemoteSigned .\OMSANotify.ps1 -Setup
Testing the script setup.
- From an Admin PowerShell run the script with the test switch .\OMSANotify.ps1 -Test (see Note below)
- This will send a test email to the $EmailTo in the script
NOTE - On Windows 2012, 2012 R2, or 2016 you may have to alter the ExecutionPolicy to get the scripts to run. Example - powershell.exe -ExecutionPolicy RemoteSigned .\OMSANotify.ps1 -Test
Testing OMSA integration. You can alter a thermal probe to think it's outside of it's range to trigger and alert.
- Login into OMSA and navigate to Shutdown -> Thermal Shutdown -> Thermal Protection Shutdown Severity = Disabled
- If it is enabled it is up to your discretion to disable it for testing.
- Navigate to Main System Chassis -> Temperatures -> Choose a Probe -> Set to Values = Minimum Warning Threshold = Current Reading + 1
- When you apply the setting you should instantly get an alert
- While on the same page either choose Set to Default or Set to Values of your original value
- If you altered the Thermal Protection Shutdown Severity set it back to your desired configuration
If the script errors during the email sending action it will write the error to a local file named OMSANotify-error.log to help in debugging.
The Dell OMSA path must be in your system path or the calls to update OMSA will fail.
The current version of OMSA-Notify does not work with SMTP credentials.
Dell OMSA 9.1 when installed disables the Alert Actions for Storage devices so you must run OMSA-Notify again to re-enable them.