清除Windows 7事件日志
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了清除Windows 7事件日志相关的知识,希望对你有一定的参考价值。
This is a simple batch script to clear the event logs from a windows 7 or server 2008 machine. The script does *not* save these logs. This was tested on a local machine but could be adapted for remote use.
@echo off @cls ::Tested on a local machine using Windows 7 x64 Home Premium ::Use the ping command to wait -n # seconds; change # for time to wait ::Basic code can be found in various places on the internet ::Modified by Rectifier 06-30-2012 ::If you receive an error try running the batch file as an administrator ::Note that the event log has to be enabled to begin with or this is a fairly useless batch ::Make readable prompt echo Clearing event logs... ::Clear event logs by searching for them using a for loop ::Clear event logs not found by the for loop wevtutil.exe cl "Microsoft-Windows-Diagnosis-DPS/Operational" wevtutil.exe cl "Microsoft-Windows-User Profile Service/Operational" wevtutil.exe cl "Microsoft-Windows-Windows Defender/Operational" wevtutil.exe cl "Microsoft-Windows-Windows Defender/WHC" wevtutil.exe cl "Microsoft-Windows-Windows Firewall With Advanced Security/Firewall" wevtutil.exe cl System ::Informing the batch is finished executing echo Batch finished!
以上是关于清除Windows 7事件日志的主要内容,如果未能解决你的问题,请参考以下文章
安装oracle11的时候 提示ORA-28056 未能将审计记录写入windows事件日志,这是怎么回事啊