Eventquery command in Windows
The eventquery command lists events and event properties from one or more event logs.
Applies to : Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.
Note: The eventquery command is not accepted and is not guaranteed to be supported in subsequent versions of Windows. This tool is integrated in Windows Server 2003.
The eventquery command lists events and event properties from one or more event logs.
Eventquery command syntax
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] [*] ] Parameters
Parameter Description/ s Computer
Note
To run this script, you must be running CScript. If you have not set the default Windows Script Host to CScript, enter:
cscript //h:cscript //s //nologo For example
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 maindomhiropln / pp @ 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:00 AM/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
See more:
- What is an IP address?
- Endlocal command in Windows
- Edit command in Windows
Discover more
Share by
Isabella Humphrey
Update 26 May 2019
You should read it
- Fc command in Windows
- Command at in Windows
- The echo command in Windows
- Doskey command in Windows
- Set command in Windows
- The Quiet Details That Make a Sports Betting Platform Feel Reliable
- Instructions on creating toy set images with ChatGPT AI
- How are AI agents changing the journalism industry?
- What is Unix and why is it important?
- What is 4 x 4 MIMO? Is your phone needed?
- The difference between 2.4GHz and 5GHz Wi-Fi