remote eventlog reading

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

Hey Hem,

What have you written so far?

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.

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.

https://powershell.org/ebooks/