{"id":137,"date":"2012-11-11T21:33:30","date_gmt":"2012-11-11T11:33:30","guid":{"rendered":"http:\/\/www.teamburns.com\/blog\/?p=137"},"modified":"2012-11-11T21:35:43","modified_gmt":"2012-11-11T11:35:43","slug":"script-to-clear-event-logs","status":"publish","type":"post","link":"https:\/\/www.teamburns.com\/blog\/script-to-clear-event-logs\/","title":{"rendered":"Script To Clear Event Logs"},"content":{"rendered":"<p>Awesome script to clear all of your Windows 7 event logs. Wish I remembered where I sourced it from to give them credit.<\/p>\n<p><code><br \/>\n@echo off<br \/>\nFOR \/F \"tokens=1,2*\" %%V IN ('bcdedit') DO SET adminTest=%%V<br \/>\nIF (%adminTest%)==(Access) goto noAdmin<br \/>\nfor \/F \"tokens=*\" %%G in ('wevtutil.exe el') DO (call :do_clear \"%%G\")<br \/>\necho.<br \/>\necho Event Logs have been cleared! ^<press any key^>\ngoto theEnd<br \/>\n:do_clear<br \/>\necho clearing %1<br \/>\nwevtutil.exe cl %1<br \/>\ngoto :eof<br \/>\n:noAdmin<br \/>\necho You must run this script as an Administrator!<br \/>\necho ^<press any key^>\n:theEnd<br \/>\npause>NUL<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Awesome script to clear all of your Windows 7 event logs. Wish I remembered where I sourced it from to give them credit. @echo off FOR \/F &#8220;tokens=1,2*&#8221; %%V IN (&#8216;bcdedit&#8217;) DO SET adminTest=%%V IF (%adminTest%)==(Access) goto noAdmin for \/F &#8220;tokens=*&#8221; %%G in (&#8216;wevtutil.exe el&#8217;) DO (call :do_clear &#8220;%%G&#8221;) echo. echo Event Logs have been &hellip; <a href=\"https:\/\/www.teamburns.com\/blog\/script-to-clear-event-logs\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Script To Clear Event Logs&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-windows-7"],"_links":{"self":[{"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":4,"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/posts\/137\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teamburns.com\/blog\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}