Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Might it be easier to work with LogParser?

share|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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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