PowerShell

Send an e-mail message from PowerShell.

This small PowerShell script will send you an e-mail message to notify you about something. I used it as a monitor for a custom, non-Microsoft service running on Windows Server 2008. Whenever the service will stop for an unexpected reason, the support guys will quickly be notified about the failure. The PowerShell script looks like this: $EmailFrom = “<e-mail address>@<yourdomain.com>” $EmailTo = “<e-mail address>@<otherdomain.com>” $Subject = “<Enter your subject here>” $Body = “<Enter the body […]