This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Looking to find a count of critical event logs on a windows server via custom counters

Here's an example of my working wmi query:

@(gwmi -query "select * from win32_ntlogevent where eventtype=1 and timegenerated > '12/1/2017'").count

 

It appears that I can only use the query section, but that doesn't appear to have a count function. Also I would like the date to be a variable for today eventually if that is possible as well. 

 

Thanks!

Parents Reply Children
No Data