WQL Problem

Joined
Feb 21, 2006
Messages
1
Reaction score
0
I'm trying to write a script that will grab the event logs from a remote computer for a specific day. I've got everything set up just how I want it, except the following line doesn't work:

Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NTLogEvent WHERE TimeGenerated LIKE " & dayt & " %",,48)

When I try to use colItems for anything I get an error: 0x80041017

dayt is an 8 character string that looks like this: 20060131
It gets set to today's date when the script is run.

If anyone has any idea why this isn't working, or can offer me any help at all it would be most appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top