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

61 comments

  1. Hey! Would you mind if I share your blog with my twitter group?

    There’s a lot of folks that I think would really
    enjoy your content. Please let me know. Cheers

  2. I truly love your website.. Great colors & theme.

    Did you build this web site yourself? Please reply back as I’m
    trying to create my very own site and would like to know where you got
    this from or what the theme is called. Appreciate
    it!

  3. Thank you for the auspicious writeup. It in reality
    used to be a entertainment account it. Glance advanced to far delivered agreeable from you!

    However, how can we keep up a correspondence?

  4. Hey there superb website! Does running a blog such as this take a
    large amount of work? I have very little
    expertise in computer programming but I was hoping to start my own blog in the near future.
    Anyways, should you have any recommendations or tips
    for new blog owners please share. I know this is off topic nevertheless I simply had to ask.
    Thanks a lot!

  5. Howdy just wanted to give you a quick heads up and let you know a
    few of the pictures aren’t loading properly. I’m not sure why but I
    think its a linking issue. I’ve tried it in two different internet browsers and both show the same outcome.

發表迴響

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

*