script powershell to clear log event

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

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.
4,612 questions
{count} votes

1 answer

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

    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

    No comments