clean_event_logs.vbs

来自「clean all the event log, include Applica」· VBS 代码 · 共 9 行

VBS
9
字号
'Clean all the Event Log in the Event Viewer

strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery ("Select * from Win32_NTEventLogFile")
For Each objLogfile in colLogFiles
	objLogFile.ClearEventLog()
Next

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?