Script to send email when an events appears

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 5 years, 11 months ago.

  • Author
    Posts
  • #6435

    by padulka at 2012-09-25 07:36:50

    Hi to all, I'find something to help me to notify when an event occur on "applications log", someone can help me?

    by DonJ at 2012-09-25 10:48:21

    You would probably want to register for a WMI event. I'm moving this to our WMI forum and you can pursue it further there; this isn't really an Exchange question.

    by padulka at 2012-09-25 11:04:18

    [quote="DonJ"]You would probably want to register for a WMI event. I'm moving this to our WMI forum and you can pursue it further there; this isn't really an Exchange question.[/quote]
    Sorry you're right.

    I'll explain my need:
    Every time I change access to a mailbox on exchange 2010 I find an event in the following location:
    Event Viewer -> Applications and Services Logs -> Microsoft -> MSExchange Management.

    I wish that every time I enter a specific event to me to notify you, or schedule a day and check for a specific event configure the sending of an email.

    by DonJ at 2012-09-25 11:21:59

    Scheduling would be easier. You could write a PowerShell script that checks for new instances of the event ID by using Get-WinEvent, and then uses Send-MailMessage to send an e-mail.

    Using a WMI event would require PowerShell to remain running all the time, which probably isn't optimal.

    Look into Get-WinEvent and Send-MailMessage.

    by willsteele at 2012-09-25 23:16:33

    Have you looked into this project?

    http://pseventlogwatcher.codeplex.com/

    by RichardSiddaway at 2012-09-26 00:25:42

    Potentially you could create a permanent WMI event but in this case I think watching the logs is going to be your best bet

    by padulka at 2012-09-26 03:40:39

    Thanks to all...I'm looking the best solution for me.

    by jtl at 2012-09-28 09:43:52

    I think you can simply right click on the event and attach a task using the Create Basic Task Wizard to send an email every time the event occurs.

    by RichardSiddaway at 2012-09-28 10:50:34

    Sending an email from an attached is deprecated in later versions of Windows. Testing the event log on a scheduled task is probably best route

You must be logged in to reply to this topic.