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

238 comments

  1. I’m really enjoying the design and layout of your website.

    It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a developer to create your theme?
    Great work!

  2. You really make it seem really easy along with your presentation but I in finding
    this matter to be really something which I feel I’d never understand.
    It kind of feels too complicated and extremely large for me.

    I am taking a look forward for your next put up, I’ll attempt to get the grasp of
    it!

  3. Thank you for the auspicious writeup. It in fact
    was a amusement account it. Look advanced to more added agreeable from you!

    However, how could we communicate?

  4. Howdy I am so happy I found your blog, I really found you by mistake,
    while I was browsing on Digg for something else,
    Anyhow I am here now and would just like to say cheers for a marvelous post
    and a all round exciting blog (I also love the theme/design), I don’t have time to
    read through it all at the moment but I have bookmarked it and also included your RSS feeds, so when I have time
    I will be back to read a great deal more, Please do keep up the
    fantastic work.

  5. Hello! I could have sworn I’ve visited your blog before but after browsing through a few of the
    posts I realized it’s new to me. Nonetheless, I’m certainly delighted I found it and I’ll
    be bookmarking it and checking back often!

  6. Please let me know if you’re looking for a writer for your site.
    You have some really good posts and I think I would be a
    good asset. If you ever want to take some of the load off, I’d really like to write some
    content for your blog in exchange for a link back to mine. Please blast me an email if interested.
    Many thanks!

  7. Great items from you, man. I have be mindful your stuff
    prior to and you are simply too fantastic. I really like what you’ve got right here, really like what you’re stating and the best
    way in which you are saying it. You’re making it entertaining and
    you continue to care for to keep it sensible.
    I can’t wait to learn far more from you. This is
    actually a great site.

  8. I blog often and I genuinely thank you for your information. The article has truly peaked my interest.

    I am going to bookmark your site and keep checking for new details about once a
    week. I opted in for your RSS feed too.

  9. I’ll right away snatch your rss feed as I can not find
    your e-mail subscription hyperlink or e-newsletter service.
    Do you’ve any? Please allow me know in order that I may just subscribe.
    Thanks.

  10. Heya i’m for the first time here. I found this board and I find It really useful & it helped me out much.
    I hope to give something back and aid others like you helped me.

  11. I blog often and I truly thank you for your content.
    The article has truly peaked my interest. I am going to book mark your website and keep checking for new details about once a week.
    I subscribed to your Feed too.

  12. I have been browsing online more than 4 hours today,
    yet I never found any interesting article like yours. It is pretty worth enough for me.
    In my opinion, if all web owners and bloggers made good content as you did, the internet will be a
    lot more useful than ever before.

  13. Have you ever considered about adding a little bit more than just your articles?
    I mean, what you say is important and all. However
    just imagine if you added some great graphics or video clips to give your posts more, “pop”!
    Your content is excellent but with pics and video
    clips, this website could certainly be one of the very best
    in its field. Great blog!

  14. Today, I went to the beachfront with my children. I found a sea shell
    and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She
    placed the shell to her ear and screamed. There
    was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is totally off topic but I
    had to tell someone!

  15. Heya! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due to no data backup.
    Do you have any methods to stop hackers?

  16. I have learn some just right stuff here. Definitely price bookmarking for revisiting.
    I wonder how much attempt you place to create this sort
    of great informative web site.

  17. Excellent goods from you, man. I have understand your stuff previous to and you are just too great.
    I actually like what you have acquired here, really like what you are stating and the way in which you say it.

    You make it entertaining and you still care for to keep
    it smart. I cant wait to read far more from you. This is actually a wonderful site.

  18. Hello There. I discovered your weblog the usage of msn.
    That is a really smartly written article. I’ll make sure to bookmark it and return to
    learn extra of your helpful information. Thank you for the post.
    I’ll certainly return.

發表迴響

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

*