Using Powershell to access IIS logs?


Using Powershell to access IIS logs?



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?




IIS as reverse proxy

1:



IIS File Permissions


Ensure that ASP.NET 3.5 Framework is installed on Windows Server 2003 64-bit


specified module could not be found - classic asp

2:



IIS virtual directory from web.config
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...


Recreate the default website in IIS
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('#')) } 



73 out of 100 based on 83 user ratings 583 reviews