Troubleshooting WQL in custom PBM conditions?

  • Hi, I'm currently trying to implement policy based mgmt with a condition to query event viewer using 'ExecuteWql'. However, WMI uses a different time format, so in addition to my WQL query, I'm nesting concatenating DATEPART() segments to build WMI-time for my WHERE clause. I'm aware of the differences with the GETDATE() syntax ('Day' vs DAY), but the whole advanced conditions thing seems to be a bit of a black box.

    My real issue is that the query's becoming quite complex and I don't really have a means of outputting any kind of decent error information. All I can do is evaluate the policy and rely on the engine telling me the query is invalid.

    Can anyone think of a means of outputting/logging more valuable information somewhere, so that I can troubleshoot the query properly, please? Even just a way to sanity-check my own code, where the syntax/parsing would be the same? I'm really lost...

    P.S. I'm new to the forum, so please let me know if my etiquette's off at all.

Viewing post 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply