How can I search IIS logs of several servers at the same time?

Solution 1:

The two answers are log centralization or remote commands.

See Windows Server Event Log Collection and Analysis for the first and do some searching for Powershell for the second (example: Powershell Remoting: Howto Run a Comand on multiple Machines with individual Parameters?)

Solution 2:

When you start needing to cross correlate logs between servers you should really look at a central log server such as Splunk. While it is possible to do so with other products like log parser, grep, etc most are designed for a single file as you have found.

Solution 3:

one answer logparser.exe http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=24659

also a good companion is Visual log parser http://visuallogparser.codeplex.com/

Examples http://technet.microsoft.com/en-us/library/ee692659.aspx

More examples http://blogs.msdn.com/b/carloc/archive/2008/02/06/logparser-scripts-for-various-occasions.aspx

Some more examples Recommended LogParser queries for IIS monitoring?

Solution 4:

You mean W3C logs, not event logs, right?

LogParser supports the use of multiple log files as input (i.e. *.log works in a FROM clause), so it's just a matter of consolidating the log files (or ensuring that they're accessible), which is usually fairly trivial to script.