Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
add comment

9 Answers

up vote 0 down vote accepted

This looks like what you might be looking for:

Automatic Mail Sending on a Windows Machine

share|improve this answer
    
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 '09 at 21:18
2  
Why couldn't you use the script and just put it in task scheduler? –  Mr Furious Nov 20 '09 at 21:43
add comment

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.

share|improve this answer
    
+1 good thinking –  Oskar Duveborn Feb 23 '10 at 21:51
add comment

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.

share|improve this answer
add comment
  1. Internal solution: Task Scheduler plus VBS script to send email: http://wiki.imacros.net/send-email.vbs

  2. External solution: Use a good web monitoring service such as AlertFox

share|improve this answer
add comment

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 admin@mydomain.com,john@homedomain.com -f admin@mydomain.com -s "Reboot Alert 192.168.0.6" -ti 30 -try 120 -noh -body "SERVERNAME has rebooted" -server SMTP_SERVER
share|improve this answer
add comment

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.

share|improve this answer
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 '09 at 20:59
    
Use srvany to convert it to a service –  ta.speot.is Jan 20 '10 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 '10 at 20:30
add comment

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

share|improve this answer
1  
Same as the previous answer: I need it to be a service. Anyway, thanks for the answer! –  Antoni Nov 20 '09 at 21:00
    
Use srvany to convert it to a service –  ta.speot.is Jan 20 '10 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). –  Oskar Duveborn Feb 23 '10 at 21:50
add comment

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

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.