remote eventlog reading

This topic contains 3 replies, has 4 voices, and was last updated by Profile photo of Martin Nielsen Martin Nielsen 1 year, 8 months ago.

  • Author
    Posts
  • #23415
    Profile photo of Hem Thapa
    Hem Thapa
    Participant

    I need powershell code to read eventlog in local or remote machine and alert via email. can anybody help to me.

  • #23416
    Profile photo of Tim Pringle
    Tim Pringle
    Participant

    Hey Hem,

    What have you written so far?

  • #23418
    Profile photo of Matt McNabb
    Matt McNabb
    Participant

    Have you tried anything yet? Do you have any code at all?

    Get-EventLog and Get-WinEvent can be used to get the events you need and Send-MailMessage does exactly that – sends a message.

  • #23442
    Profile photo of Martin Nielsen
    Martin Nielsen
    Participant

    There's a ton of PowerShell code in the free ebooks located on this very site. Some of it covers how to view event log entries, and some of it covers how to do things remotely.

You must be logged in to reply to this topic.