Advertisement
guyrleech

Filtering today's IIS log into sortable/filterable grid view

Feb 25th, 2020 (edited)
956
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Get-Content -Path "C:\inetpub\logs\logfiles\w3svc1\$(Get-Date -Format 'u_exyyMMdd.lo\g')"|Where-Object { $_ -match '^(\d|#Fields)' } | ForEach-Object { $_ -replace '^#Fields: ' } |ConvertFrom-Csv -Delimiter ' '|Where-Object cs-uri-stem -NotMatch 'monitor\.aspx$' |Select-Object -Property *,@{name='Duration';expression={([int]$_.'time-taken')}} |Out-GridView
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement