O'Reilly logo

Windows Server 2003 in a Nutshell by Mitch Tulloch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

eventquery — new in WS2003

Synopsis

Displays events from event logs.

Syntax

eventquery [/s Computer [/u Domain\User [/p Password]]] [/fi Filter] 
  [/fo {TABLE | LIST | CSV}] [/r EventRange [/nh] [/v] 
  [/l [APPLICATION] [SYSTEM] [SECURITY] ["DNS server"] [UserDefinedLog] 
  [DirectoryLogName] [*] ]

Options

/s Computer

Name or IP address of remote computer (if omitted, defaults to local computer).

/u Domain\User /p Password

Credentials for running the command (if omitted, defaults to currently logged-on user).

/fi Filter

Filter for specifying types of events to search for (enclose in quotes). These can be:

Datetime {eq | ne | ge | le | gt | lt} {mm/dd/yy(yyyy) | hh:mm:ss{AM | PM}}
Type {eq | ne} {ERROR | INFORMATION | WARNING | SUCCESS | SUCCESSAUDIT | FAILUREAUDIT}
ID {eq | ne | ge | le | gt | lt} ValidInteger.
User {eq | ne} ValidString
Computer {eq | ne} ValidString
Source {eq | ne} ValidString
Category {eq | ne} ValidString
/fo {TABLE | LIST | CSV}

Format for command output.

/r EventRange

Range of events to display. This can be:

N

Lists N most recent events

-N

Lists N oldest events

N1-N2

Lists events N1 to N2

/nh

No headers for columns in output (TABLE and CSV format only).

/v

Verbose information should be displayed.

/l [APPLICATION] [SYSTEM] [SECURITY] ["DNS server"] [UserDefinedLog] [DirectoryLogName] [*]

One or more logs to query, with the default being wildcard (*). Reuse the /l switch if you want to query more than one log.

Examples

Display five most recent events from System log: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required