Powershell Script

Balayuvaraj M 31 Reputation points
2023-07-26T12:36:28.0133333+00:00

Need a powershell script once a event id triggered in the server, then a mail notification need to a particular DL

In that event id and particular user name matches, above action need to be performed

For example: in the security log Event id 4776 triggered by an administrator account. Then mail needs to send.

I could not able to see the events in the server, logs are overwritten very fast.

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,864 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 30,916 Reputation points
    2023-07-26T13:44:19.6966667+00:00

    There are plenty of examples and discussions out on the internet.

    https://www.bing.com/search?q=a+powershell+script+once+a+event+id+triggered+in+the+server%2C+then+a+mail+notification

    https://community.spiceworks.com/how_to/123434-run-powershell-script-on-windows-event

    I could not able to see the events in the server, logs are overwritten very fast.

    In that case your logs are too small, or you have some other problem.