-1

I want to delete critical error found in both application and system logs in event viewer.

I want this to be done every week, so I will be using task scheduler to perform this with a script.

I am having trouble deleting critical errors in event viewer. I am not sure which level option to include, as the Windows documentation for it does not specify how many levels are available, making this very vague.

I tried the following, but Powershell deletes all events in the application log (information, warning, and error): wevtutil qe Application /q:"*[System[(Level=2)]]" /f:txt | wevtutil cl Application.

I have also come across this Serverfault post from 2009, but it did not give an answer nor did it state if it could be done in Powershell to create a task out of it:

How can I remove specific events from the event log in Windows Server 2008?

1
  • What problem are you trying to solve by doing this? Commented Nov 24 at 17:53

1 Answer 1

0

Windows does not provide a mechanism to remove or delete individual events.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.