Question

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?

Was it helpful?

Solution

Check out this blog post:

IIS 7.0 Powershell Support

OTHER TIPS

Would a quick and dirty script work? The third line of the W3c log file header (saved by default by IIS) has a #Header line... Save the following as Import-W3CLog.ps1

param ($logfile)
import-csv -Delimiter " " -Header "date","time","s-ip","cs-method","cs-uri-stem","cs-uri-query","s-port","cs-username","c-ip","csUser-Agent","sc-status","sc-substatus","sc-win32-status","time-taken" -path $logfile | where { !($_.Date.StartsWith('#')) }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top