I am looking for samples on howto parse IIS log files. I am just getting started, and rather then search for site, I want personal recommendations how sample sites, sample code or a good book to get started down this learning path.

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

Might it be easier to work with LogParser?

link|improve this answer
Thanks for the pointer, I am familiar with LogParser, I heard you can use PowerShell for parsing logs as well, need some samples to get started. – user36440 Mar 4 '10 at 18:45
feedback

When I don't have logparser available, I've had luck with Select-String like in the example from http://mohundro.com/blog/2006/11/06/find-in-files-with-powershell/ Select-String uses regular expressions by default, so it is very powerful.

Get-ChildItem -Recurse -Include *.* | Select-String "text to search for"

I've also used the WebAdministration Module for Powershell to find the right log directory for the sites.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.