Windows – Event log notification by email

windows

Is there a way to have windows server email me a message anytime a user logs on to server?

Best Answer

On Windows server 2008 create a task using the task scheduler. Choose create task , and on the trigger tab choose to begin the task on login for any user. Under actions choose send an email. You might also want to set the seting under the settings tab to run a new instance in parallel if the task is running to catch multiple logons.

E-mail is sent using NTLM authentication for Windows SMTP servers, which means that the security credentials used for running the task must also have privileges on the SMTP server to send e-mail. If the SMTP server is a non-Windows based server, then the e-mail will be sent if the server allows anonymous access. If it's a Non-windows email relay you can instead kick off a script that send the email (which you can then specify the credentials used to relay in.