1

I'd like to be alerted by e-mail when one of my server starts. There are some power issues and want to be alerted when it recovers from a power outage (I have to open a user session in order to some program starts running). Do you know of any service that sends and e-mail to a given address when it starts? The server is runng Windows 2003 Server.

Thanks in advance!

0

8 Answers 8

0

This looks like what you might be looking for:

Automatic Mail Sending on a Windows Machine

2
  • Well, i really need something that runs as a service (not a command-line instruction), as no session will be started on the server. Thanks anyway.
    – Antoni
    Nov 20, 2009 at 21:18
  • 2
    Why couldn't you use the script and just put it in task scheduler?
    – Mr Furious
    Nov 20, 2009 at 21:43
3

You can use the built-in Task Scheduler to run something without having to log in. Simply check the When my computer starts box as shown here:

alt text

You can configure this to run a batch script which uses any of the command line mailers specified in other answers.

0
0

Setup a script to fire on startup using the Task Scheduler. There are many scripts available via Google to send an email, just pick one and schedule it. Task scheduler jobs don't require a logon to run.

OR

Monitor the server from another computer with a monitoring application and set the app to email on server down and/or server startup. There's a huge number of monitoring options, Spiceworks is free and seems to be gaining some traction in the Windows area.

0

This can also be done through group or local policies. I use policies to run a batch file on computer startup. That batch file uses Blat to send the email.

c:\windows\blat.exe - -to [email protected],[email protected] -f [email protected] -s "Reboot Alert 192.168.0.6" -ti 30 -try 120 -noh -body "SERVERNAME has rebooted" -server SMTP_SERVER
0

use a command line mailer (e.g. Bmail) and run a batch file at startup.

Bmail is freeware, like all the other useful utilities form Beyond Logic.

3
  • 1
    Something at startup is not useful in this case; I need it to be a service because I need to receive an e-mail with no session started on the server. Thanks anyway!
    – Antoni
    Nov 20, 2009 at 20:59
  • Use srvany to convert it to a service Jan 20, 2010 at 22:39
  • 1
    Molly said "at startup", not "at login". Startup means when the computer starts. Those tasks run as System. Does not need to be a service.
    – mfinni
    Feb 23, 2010 at 20:30
0

I would install powershell 2.0 and write a small cmdlet function which sends email when it starts. I believe you can assign this to startup using GPO. I believe the cmdlet is send-mailmessage

http://www.jonathanmedd.net/2009/11/powershell-2-0-one-cmdlet-at-a-time-2-send-mailmessage.html

3
  • 1
    Same as the previous answer: I need it to be a service. Anyway, thanks for the answer!
    – Antoni
    Nov 20, 2009 at 21:00
  • Use srvany to convert it to a service Jan 20, 2010 at 22:38
  • Why does it need to be a service? Running as a startup script will execute it using System when the machine boots up - before anyone logs on (which is a login script). Feb 23, 2010 at 21:50
0

If you don't mind some coding, here is some sample code that might be a good start, or an exact fit, for what you want to do: Simple Windows Service which sends auto Email alerts

0

I have used in the past for client servers a command line utility called BLAT it allows simple emails to be sent. You can set it in a scheduled task as mentioned above to run when the computer starts. This will do what you want it to do! Let me know if you get stuck and I will help you out!

James

You must log in to answer this question.