Home All Groups Group Topic Archive Search About

Re: Scripting for Event logs



Author
19 Oct 2007 4:07 PM
BJW
Hi,

I have tried running the original script posted by "lyott" on an XP SP2
machine but it does not seem to work.
When I debugged it I found that the following line seems to be returning an
empty collection (Count = 0): Set colLogFiles = objWMIService.ExecQuery
("......")

Any help would be greatly appreciated.

Show quote
"Richard Mueller [MVP]" wrote:

>
> "Dana Stevenson" <Dana Steven***@discussions.microsoft.com> wrote in message
> news:2D7733A9-4429-4CF9-938E-F773023CCD8D@microsoft.com...
> > Is there a way to add the date of the archive?
> >
> > Right now the script creates a file application.evt
> >
> > Can I have the date also in the title of the archive like
> > application080807.evt
> >
> > Something like that ??
> >
> > Thanks in advanced
>
> Something like this should work:
>
> strFile = "Application" & Month(Now()) & Day(Now()) & Right(Year(Now()), 2)
> & ".evt"
> errBackupLog = objLogFile.BackupEventLog("c:\scripts\" & strFile)
>
> --
> Richard Mueller
> Microsoft MVP Scripting and ADSI
> Hilltop Lab - http://www.rlmueller.net
> --
>
>
>

AddThis Social Bookmark Button