Skip to content

Instantly share code, notes, and snippets.

@belotn
Created April 17, 2013 16:14
Show Gist options
  • Save belotn/5405578 to your computer and use it in GitHub Desktop.
Save belotn/5405578 to your computer and use it in GitHub Desktop.
OneLiner to List connecting IPs from IIS Logs
get-content "Path/To/File" |? { $_ -notlike "#[D,S-V]*"} |%{ @($_.Split(" "))[8] }|sort | group | select Name,Count,@{N='HostName',E={[system.net.dns]::GetHostEntry($_.Name}.HostName } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment