I know you can use powershell to make things like the registry a drive letter. There are other objects in powershell to treat other objects in this way. Does anyone know of any cmd-lets to access IIS logs in this manner?
thanks. but these seem to drive managing the configuration of IIS through powershell, not reading/parsing the log files for requests. Did I miss something?
MikeJ
2008-09-22 17:21:01
You probably didn't miss anything. Those are the only cmdlets I am aware of. Could you post more information about exactly what functionality you would like to see. The log files are just text files right? Is there something special that makes them different from parsing any other text file?
EBGreen
2008-09-22 17:29:37
what I was looking to do was build scripts that would allow me to access all the vlaues in a log entry so that I could compute stats such as # of 404s, total bytes served etc.
MikeJ
2008-09-22 18:30:23
In that case I'd say you are stuck writing your own parser. The good news is that it should be pretty trivial in Powershell.
EBGreen
2008-09-22 19:01:42
i found logparser 2.2 which will work. albiet a bit clunky as I was looking to integrate it into code a bit better.
MikeJ
2008-09-22 20:28:01
You can always use ODBC to connect to the text file and use SQL to query for ADO recordsets.
EBGreen
2008-09-22 20:41:41