script powershell to clear log event

Daniel do Vale Sampaio 1 Reputation point
2021-10-15T14:09:09.147+00:00

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

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,363 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,351 Reputation points
    2021-10-18T09:17:03.227+00:00

    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

    0 comments No comments