Windows 事件紀錄已滿(VBS)

Windows 安全性紀錄已滿為例

使用最高權限,我的電腦右鍵>管理

事件檢視器,安全性

事件檢視器,安全性按右鍵【清除所有事件】之後問儲存檔案要選
安全性右鍵【內容】點選視需要覆寫事件套用確定。

此外還可以透過WMI撰寫相關自動化腳本刪除。

清除安全性紀錄VBS

strComputer = "."
 Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate,(Backup)}!\\" & _
         strComputer & "\root\cimv2")
 Set colLogFiles = objWMIService.ExecQuery _
     ("Select * from Win32_NTEventLogFile " _
     & "Where LogFileName='System'")
 For Each objLogfile in colLogFiles
     objLogFile.ClearEventLog()
     WScript.Echo "Cleared System event log file"
 Next

清除Internet Explorer紀錄VBS

strComputer = "."
 Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate,(Backup)}!\\" & _
         strComputer & "\root\cimv2")
 Set colLogFiles = objWMIService.ExecQuery _
     ("Select * from Win32_NTEventLogFile " _
     & "Where LogFileName='Internet Explorer'")
 For Each objLogfile in colLogFiles
     objLogFile.ClearEventLog()
     WScript.Echo "Cleared Internet Explorer event log file"
 Next

清除應用程式VBS

strComputer = "."
 Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate,(Backup)}!\\" & _
         strComputer & "\root\cimv2")
 Set colLogFiles = objWMIService.ExecQuery _
     ("Select * from Win32_NTEventLogFile " _
     & "Where LogFileName='Application'")
 For Each objLogfile in colLogFiles
     objLogFile.ClearEventLog()
     WScript.Echo "Cleared application event log file"
 Next

清除系統紀錄VBS

strComputer = "."
 Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate,(Backup)}!\\" & _
         strComputer & "\root\cimv2")
 Set colLogFiles = objWMIService.ExecQuery _
     ("Select * from Win32_NTEventLogFile " _
     & "Where LogFileName='System'")
 For Each objLogfile in colLogFiles
     objLogFile.ClearEventLog()
     WScript.Echo "Cleared System event log file"
 Next

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *


*