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 cmdlets to access IIS logs in this manner?
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('#')) }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With