Share this article

Improve this guide

4 easy ways to create email notifications for Event viewer

4 min. read

Updated onOctober 4, 2023

updated onOctober 4, 2023

Share this article

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Key notes

When you aren’t using your computer, you may want to know what’s happening on your PC or who’s accessing it. What program is being opened and when, or any activity that happens on your Windows computer, you will want to know about it.

Keeping a log of the events is possible, but unfortunately, it can be a pain to check the log because it is not user-friendly and it can be difficult to sift through the events because they are not straightforward.

But that doesn’t mean there isn’t a workaround!

You can configure the system to send out emails whenever an activity takes place usingWindows event vieweremail notification, this way you can stay up-to-date.

How can I get email alerts in the Windows Event Viewer?

How can I get email alerts in the Windows Event Viewer?

1. Create a Powershell script

$EventId = 16,20,23,150,219,220$A = Get-WinEvent -MaxEvents 1 -FilterHashTable @{Logname = “System” ; ID = $EventId}$Message = $A.Message$EventID = $A.Id$MachineName = $A.MachineName$Source = $A.ProviderName$EmailFrom = “[email protected]"$EmailTo = “[email protected]"$Subject =“Alert From $MachineQ”$Body = “EventID: $EventIDnSource: $SourcenMachineQ: $MachineQ `nMessage: $Message”$SMTPServer = “smtp.gmail.com”$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)$SMTPClient.EnableSsl = $true$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("[email protected]”, “PPDOMAIN@67W0rdD”);$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)

Install a third-partySMTPservice provider and configure the settings properly as instructed by the provider. Also, confirm if you’ve given the correct destination email; otherwise, you won’t receive any email.

Once done, save the script on your computer, for example, C:\ScriptsPowerShell\eventnotification-send-email.ps1

Now follow the below steps to enable email notification for all the events.

2. Setting up notifications of events using Task Scheduler

3.Create a Scheduled Task

4. Automate the deployment

If you are an administrator or if you simply want to keep track of all the events that are happening on your system, you could keep track of them usingWindows Event Viewer, but the program is not straightforward.

Hence, you can have all the events emailed to you and keep yourself updated. Feel free to share your experience with us by using the comment section found below this guide.

More about the topics:event log viewers

Abdul Moiz

Abdul Moiz loves technology, fashion, photography, and business.

His first love is technology and he loves talking about it. How does he chill? You are most likely to catch him traveling or watching tech videos.

User forum

1 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Abdul Moiz