Wednesday, April 10, 2013

Send e-mail alert when Windows Server reboots

Here is how you can send an e-mail alert when a Windows Server reboots. This has been tested on Server 2008, Small Business Server 2008, and Small Business Server 2012. It should work for Server 2012, but I have not had a chance to test this.

  1. Download sendemail.exe file and save it to a folder on server. I like to save it to a folder called C:\Scripts
  2. Open Notepad/Wordpad/Text Editor and add the following:
    c:\Scripts\sendemail.exe -f -t; -u "SERVERNAME rebooted" -m "SERVERNAME has rebooted!" -s
  3. Save the file as rebootalert.cmd in the C:\Scripts folder.
  4. Open Task Scheduler.
  5. Add a new Task and call it Reboot Alert. Set the User to be SYSTEM. Set Trigger to be At System Startup. Set Actions to be Start a Program and add the path C:\Scripts\rebootalert.cmd.
Test the script by rebooting the server. You should receive an e-mail alert that the server rebooted.

Other helpful links:


  1. Thanks for this.. I have been looking for this for a looong time!

  2. What if I wanted to send an email through office 365?

    1. You will need to create a connector with your server.
      Create a Script specifying your SMTP server, which usually is: and it will work.
      I have the same setup for a different purpose.