I'm simply trying to pull data from the event log for errors and critical errors for the past 7 days. I'm having a problem doing the query using the WMI date format (UTC). I'd prefer to have this done within the query if possible. Can anyone help?
Looking for something like this:
"SELECT * from Win32_NTLogEvent WHERE Logfile = 'System' AND TYPE = 'ERROR' AND TIMEGENERATED > [TODAYS DATE - 7 DAYS]"