Lists the events and event properties from one or more event logs.
eventquery[.vbs][/s Computer [/u Domain\User [/p Password]]][/fi FilterName][/fo {TABLE | LIST | CSV}][/r EventRange [/nh] [/v] [/l [APPLICATION] [SYSTEM] [SECURITY] ["DNS server"] [UserDefinedLog] [DirectoryLogName] [*] ]
| • | To run this script, you must be running CScript. If you have not already set the default Windows Script Host to CScript, type: cscript //h:cscript //s //nologo |
The following examples show how you can use the eventquery command:
eventquery /l system
eventquery /l mylog
eventquery /l application /l system
eventquery /s srvmain /u maindom\hiropln /p p@ssW23 /v /l *
eventquery /r 10 /l application /nh
eventquery /r -10 /fo LIST /l security
eventquery /r 5-10 /l "DNS server"
eventquery /fi "Type eq Error" /l application
eventquery /fi "Datetime eq 06/25/00,03:15:00AM/06/25/00,03:15:00PM" /l application
eventquery /fi "Datetime gt 08/03/00,06:20:00PM" /fi "id gt 700" /fi "Type eq warning" /l system
| Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |
| InitWizard("68672494-7700-4cbf-8392-4b6ef87b87491033"); |