Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [datetime]$todayStart = Get-Date -Date ([datetime]::Now) -Hour 0 -Minute 0 -Second 0
- [datetime]$date1970=Get-Date -Date '1/1/1970';(Get-Content -Path C:\Squid\var\log\squid\access.log) -replace '\s+',' '|Select-Object -Last 1000|ConvertFrom-Csv -Delimiter ' ' -Header Time,Duration,ClientAddress,Result,Bytes,Method,URL,User,Hierarchy,type|Select-Object -Property @{n='Time';e={$date1970.AddSeconds( $_.Time )}},* -ExcludeProperty Time|Where-Object{ $_.ClientAddress -eq '10.1.1.109' -and $_.Method -eq 'GET' -and $_.Time -gt $todayStart }|Out-GridView
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement