By David Wiseman (Administrator)Created 08 Feb 2008
My Rating:
Vote
Rating:
Not Rated
Views:8181
Downloads:129

Back Up and Clear Large Event Logs

Language:  VBScript

Compatibility

Windows XP Yes Windows 2003 Yes
Windows 2000 Yes Windows NT Yes
Vista Unknown Windows 2008 Unknown
Description

Backs up and clears an event log if the log file size is larger than 20 megabytes.

Code

Line Numbers: On  Off      Plain Text
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate, (Backup, Security)}!\\" _
        & strComputer & "\root\cimv2")

Set colLogFiles = objWMIService.ExecQuery _
    ("Select * from Win32_NTEventLogFile")

For Each objLogfile in colLogFiles
    If objLogFile.FileSize > 100000 Then
       strBackupLog = objLogFile.BackupEventLog _
           ("c:\scripts\" & objLogFile.LogFileName & ".evt")
       objLogFile.ClearEventLog()
    End If
Next

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      
xiaoou
Posted On: 4/25/2019 9:25:21 AM

guess clothing cheap jordans ferragamo outlet store true religion jeans ed hardy pandora jewelry outlet prada handbags giants jerseys nike air max 90 oakley sunglasses outlet seahawks jerseys kobe shoes birkenstock outlet michael kors outlet clearance rolex replica watches for sale yeezy shoes hermes bags nobis jackets red bottoms yeezy shoes uggs outlet louis vuitton purses michael kors outlet air jordan shoes air max 97 coach factorty outlet store maui jim sunglasses nike factory store salvatore ferragamo shoes patriots jerseys nike outlet online air jordan uk ralph lauren outlet air max plus barcelona jersey oakley sunglasses outlet columbia outlet store ralph lauren uk prada sunglasses coach outlet store cheap jordan shoes jimmy choo shoes ed hardy shoes birkin handbags nike factory store coach outlet online revolution 3 coach outlet store valentino shoes adidas superstars tigers jerseys curry 5 shoes coach outlet canada coach outlet store ubiq shoes nike outlet online salomon shoes hydro flask lids coach outlet store online mbt shoes birkenstocks canada goose pandora charms converse shoes bathing ape asics outlet moncler pas cher louboutin shoes pandora jewelry outlet jaguars jersey true religion jeans chaussures christian louboutin adidas outlet online nba jerseys true religion jeans mcm handbags adidas yeezy boost 350 stone island sale air max 2017 ed hardy outlet discount oakley sunglasses canada goose coats adidas outlet michael kors outlet clearance supra shoes broncos jerseys adidas ultra boost michael kors outlet online air max 2017 true religion outlet giuseppe zanotti shoes adidas uk david yurman bracelet mont blanc pandora charms coach outlet clearance coach bags michael kors outlet online pittsburgh steelers jersey coach outlet online kate spade outlet jets jersey cincinnati bengals jersey lions jerseys birkenstock sandals jordans air jordan pandora outlet fred perry uggs cheap mbt shoes nike outlet store converse???? pandora jewelry canada canada goose outlet store pandora jewelry outlet maui jim moncler jacken toms superdry clothing hydro flask cup fitflops outlet north face jackets louis vuitton pandora sale clearance pandora rings coach outlet kate spade outlet store christian louboutin sale persol kate spade outlet online ugg outlet sale yankees jerseys louboutin outlet uggs outlet fitflops outlet raiders jerseys ugg boots clearance indianapolis colts jerseys adidas outlet online coach bags ray ban sunglasses moncler jacka ugg boots cheap jordans fitflops adidas outlet store jordan 12 oakley sunglasses outlet balenciaga shoes ralph lauren outlet online gymshark clothing converse???? coach factory outlet online nike sneakers christian louboutin christian louboutin shoes fitflops sale clearance prada outlet cheap handbags yeezy shoes nike hyperdunk moncler jackets oakley sunglasses wholesale coach purse fitflops curry 4 shoes true religion outlet store ralph lauren polo yeezy boost 350 cheap jordans adidas nmd r1 gucci outlet online uggs canada air jordan 4 pandora jewelry canada ugg italia tods outlet online coach outlet online puma shoes michael kors outlet clearance off-white clothing under armour shoes coach outlet online coach factory outlet adidas neo shoes dolce & gabbana Outlet coach factory outlet pandora jewelry outlet mulberry bags sale coach factory outlet online coach factory outlet fjallraven kanken eagles jersey nhl jerseys coach outlet online lebron 13 rolex replica watches timberland boots kate spade outlet true religion outlet store adidas shoes off white clothing canada goose outlet store soccer jerseys snapback hats miu miu shoes rolex watches cheap nike shoes coach outlet store online instyler ionic styler michael kors outlet clearance polo ralph lauren outlet online christian louboutin sale coach outlet store online hydro flask sale miu miu handbags clarks shoes coach outlet sale converse shoes coach outlet online ugg outlet nike kd 10 falcons jerseys true religion jeans sale christian louboutin outlet air max ralph lauren outlet coach factory outlet polo ralph lauren outlet online air max 2015 canada goose coats pandora jewelry outlet nike basketball shoes titans jersey coach factory outlet online louboutin outlet coach outlet online nba jerseys for sale michael kors outlet clearance air jordan retro moncler outlet online pandora jewelry outlet bape hoodie lacoste outlet ralph lauren outlet nike air force valentino outlet christian louboutin shoes moncler outlet online polo outlet store kate spade persol sunglasses sale coach factory outlet online philipp plein outlet canada goose coats christian louboutin shoes fitflop sale coach outlet online michael kors outlet coach factory outlet air max outlet coach outlet online adidas nmd runner mcm outlet michael kors outlet online nike outlet store online coach outlet online jordan shoes air jordan coach factory outlet online pandora charms cheap snapbacks david yurman ugg outlet clearance gucci bags coach factory outlet online kevin durant shoes fitflops ralph lauren pas cher ugg boots sale ralph lauren polo true religion outlet converse shoes michael kors factory outlet coach factory outlet birkenstocks nike roshe cazal outlet coach handbags clearance polo ralph lauren outlet online coach factory outlet online ugg yeezy shoes air jordan retro coach outlet store online clearance yeti tumbler canada goose jackets uggs outlet true religion outlet store camisetas futbol baratas adidas sneakers ugg boots canada goose sale off white clothing coach factory outlet online polo outlet pandora outlet michael kors outlet online coach outlet adidas slides malone souliers shoes pandora canada y3 shoes pandora charms outlet chrome hearts outlet store cheap mlb jerseys ferragamo outlet parajumpers jacket nike outlet store coach outlet clearance jordan pas cher ralph lauren polo coach factory outlet cheap jordan shoes cnaada goose outlet store nike sneakers coach factorty outlet online true religion moncler jackets toms coach outlet store pandora charms sale clearance michael kors outlet store coach outlet online celine outlet valentino coach factory outlet online ed hardy jimmy choo shoes ugg outlet uggs outlet online patriots jerseys mcm outlet store nike outlet store north face outlet adidas outlet online true religion jeans christian louboutin outlet coach outlet store mac cosmetics vans shoes kobe shoes kate spade outlet online swarovski jewelry outlet uggs outlet air jordan 14 coach outlet online nike outlet store jordan 31 cheap oakley sunglasses kate spade outlet coach outlet online cowboys jerseys coach outlet online fred perry michael kors outlet canada christian louboutin shoes adidas shoes polo outlet store coach outlet online birkenstock outlet store pandora charms coach outlet online louis vuitton outlet online ysl outlet uboutin shoes toms outlet online marc jacobs handbags louboutin outlet off white shirt louboutin outlet coach outlet online stone island sale hermes polo ralph lauren outlet cheap jordan shoes michael kors outlet online coach outlet online moncler sito ufficiale fitflops sale clearance christian louboutin outlet louboutin outlet cheap ugg boots ferragamo outlet louboutin outlet canada goose coach outlet store online coach outlet online fjallraven backpack coach factory outlet online air max ed hardy outlet seattle seahawks jersey ferragamo belts true religion outlet kate spade outlet uggs outlet cheap soccer jerseys asics running shoes cardinals jerseys fitflops david yurman coach outlet online mac makeup cubs jerseys durant shoes coach outlet online costa sunglasses sale fitflops outlet mlb jerseys coach outlet online adidas nmd christian louboutin outlet toms outlet store ugg pas cher jordan shoes manolo blahnik outlet pandora charms sale ralph lauren uk prada outlet online kendra scott valentino outlet store north face outlet store mbt shoes polo ralph lauren outlet prada outlet phillies jerseys michael kors bags gymshark sale ecco outlet asics shoes coach outlet online true religion jeans outlet fitflops sale clearance coach outlet pandora charms sale clearance pandora charms sale adidas yeezy shoes coach handbags outlet coach factory outlet online supreme clothing kate spade outlet sale air jordan shoes north face outlet cardinals jerseys nike outlet store nike shoes browns jerseys fivefingers shoes jordans air huarache gucci outlet online kobe 12 ugg outlet lacoste polo shirts coach outlet clearance air max nike outlet online coach factorty outlet online kate spade handbags pandora charms outlet pandora charms canada goose coats polo ralph lauren outlet christian louboutin outlet michael kors outlet clearance coach outlet store online david yurman jewelry pandora jewelry ugg boots pandora jewelry outlet gucci outlet online air max 2017 coach factory outlet yeti cheap jordans for sale le coq sportif cheap air jordans coach outlet online fitflops sale clearance louis vuitton outlet store kobe 11 uggs outlet suicoke sandals kate spade outlet online adidas yeezy boost coach factory outlet online louboutin outlet cheap maui jim sunglasses the north face jackets coach outlet store vans sneakers minnesota vikings jersey ralph lauren outlet online david yurman coach outlet store coach outlet canada chelsea jersey juicy couture valentino outlet nike max coach outlet online michael kors outlet canada adidas nmd ralph lauren outlet online canada goose true religion outlet store cincinnati reds jerseys michael kors outlet store pandora charms coach outlet store michael kors outlet clearance air jordan 3 ed hardy coach factory outlet store pandora charms outlet celine outlet cheap jordan shoes gymshark sale ed hardy canada goose outlet north face outlet store coach factory outlet coach factory outlet true religion jeans giuseppe zanotti outlet store san diego chargers jerseys mbt shoes outlet ugg outlet store coach outlet clearance nike flip-flops nike shoes ralph lauren polo prada outlet adidas store coach handbags coach factory outlet online michael kors outlet online nike free flyknit gucci outlet store ray ban sunglasses outlet pandora charms sale clearance miu miu shoes coach outlet online coach outlet online coach outlet store kate spade outlet online dolce & gabbana sunglasses kate spade outlet online coach factorty outlet store nike air max 2018 louboutin outlet air max pas cher christian louboutin outlet nike shoes cheap ray ban sunglasses converse shoes canada goose outlet kappa clothing red sox jerseys soccer shoes cheap air jordans hermes bags pandora jewelry store nike blazer coach outlet online nike free run fila shoes cheap snapbacks yeezy shoes nike outlet ralph lauren uk coach outlet online nike air force 1 ronaldo jerseys fjallraven kanken ugg boots outlet air max 270 ugg boots coach factory outlet online oakley sunglasses outlet cheap jordan shoes converse shoes chi flat iron coach outlet online asics shoes nike outlet store north face outlet online polo ralph lauren outlet canada goose coats air max shoes michael kors handbags outlet coach factory outlet coach outlet jordan shoes for sale nike tn michael kors outlet online nike outlet kate spade outlet online suicoke sandals hermes belt nike outlet twins jerseys canada goose coats nike outlet online nike roshe run kate spade outlet online fitflops yeti cup true religion outlet nike air max schweiz coach outlet sale cheap air max christian louboutin outlet pandora jewelry juicy couture coach handbags adidas yeezy boost coach outlet canada ralph lauren outlet coach outlet online versace clothing pandora charms pandora charms coach canada outlet polo ralph lauren outlet online kendra scott coach factory outlet online mulberry handbags ralph lauren outlet coach outlet online converse???? jordan retro 11 pandora charms sale clearance coach handbags coach outlet store coach outlet online nike tn ugg italia mont blanc pen air jordan shoes true religion outlet mbt shoes toms shoes coach outlet online air jordan shoes cheap mlb jerseys denver broncos jersey costa sunglasses sale prada outlet kate spade handbags kate spade handbags hydro flask sale kyrie 2 cheap jordans free shipping coach outlet store true religion coach outlet store louis vuitton outlet online true religion outlet store coach outlet canada goose outlet store gucci outlet online moncler coach outlet online retro 11 givenchy handbags nike blazer nike factory store cheap snapbacks foamposite shoe coach outlet store online kendra scott houston texans jerseys fitflops sale clearance air max adidas ultra boost vibram fivefingers outlet adidas wings shoes packers jersey birkenstock shoes louboutin pas cher canada goose outlet persol sunglasses coach outlet online moncler outlet online coach outlet store online toms shoes stone island hoodie pandora outlet hermes outlet store coach outlet online ralph lauren sale clearance uk christian louboutin shoes buffalo bills jersey ravens jerseys yolo