question

DanielSampaioRavelTecnologia-4498 avatar image
0 Votes"
DanielSampaioRavelTecnologia-4498 asked LimitlessTechnology-2700 answered

script powershell to clear log event

i need a script to just erase the id 4625 event log and make a backup

windows-server-powershell
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You cannot remove individual events from an event log. You can only clear the entire event log. Like the Application event log or the System event log.

I would suggest that you explain the root problem that you are trying to solve. Please be specific.

0 Votes 0 ·

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello,

Thank you for your question.

Microsoft purposely prevents you from doing this. The whole concept of the Event Viewer is to present to you certain events that may require your attention. If one could go in and delete any random event, then the system could - in a sense - be compromised without you knowing, therefore making it unsafe.



If the reply was helpful, please don’t forget to upvote or accept as answer. Thanks, Prakash

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.