Powershell script that will alert me when a certain windows event occurs

RayPaks 31 Reputation points
2022-10-05T06:12:36.863+00:00

Hi. I've been trying to get this working but I've seemed to have hit a brick wall.

Trying to figure out a way to establish an email alert that will let me know when a certain Windows EventID happens.

Preferably I want this set up in SQL server as a job because you can access the powershell subsystem in the job steps, and set a job schedule therein but I'm open to having it set up any other way

I've seen a couple of posts on some forums that were helpful but not helpful enough for me to get this over the line.
A number of them use powershell and then Task scheduler to run a task, this link was helpful and I followed the steps but it is still not working:

https://www.sqlservercentral.com/blogs/step-by-step-how-to-trigger-an-email-alert-from-a-windows-event-that-includes-the-event-details-using-windows-server-2016

Please let me know

Windows for business | Windows Server | User experience | PowerShell
SQL Server | Other
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.